NO

Recent Posts

Pages: [1] 2 3 ... 10
1
Bug reports / Re: Different result with -O2 than without it
« Last post by stecoop on Today at 03:54:21 am »
I've run into a similar problem; If I have the -O2 (or -Ot as it shows in the compiler options settings), two of my programs display incorrect results when scaling the display for graphing, or rotating text for display. If I compile with no optimizations, both programs work correctly.

Is there something I can change so that all new projects default to No Optimizations?

Also, I've noticed when using the debugger, and stopped at a breakpoint, the debugger shows all ints as BOOLs (thats BOOL, not _Bool), not as ints.

Comments, anybody?
2
Add-ins / IDE_TEXT Add-In
« Last post by TimoVJL on Today at 12:44:38 am »
IDE_TEXT Add-In add TEXT("test") for UNICODE purposes.
Add source menu option Insert TEXT()
Code: [Select]
ADDINAPI void WINAPI AddInCommandEx(int idCmd, LPCVOID pcvData)
{
HWND hDoc = AddIn_GetActiveDocument(g_hwndMain);
if (hDoc) {
ADDIN_RANGE range;
TCHAR szTmp[50];
AddIn_GetSourceSel(hDoc, &range);
int iStartPos = range.iStartPos;
int iEndPos = range.iEndPos;
// start
if (iStartPos) range.iStartPos = iStartPos - 1;
range.iEndPos = iStartPos;
AddIn_SetSourceSel(hDoc, &range);
AddIn_GetSourceSelText(hDoc, szTmp, sizeof(szTmp)/sizeof(TCHAR));
//AddIn_WriteOutput(g_hwndMain, szTmp);
if (*szTmp == '\"') range.iEndPos = iStartPos - 1;
else range.iStartPos = iStartPos;
AddIn_SetSourceSel(hDoc, &range);
AddIn_ReplaceSourceSelText(hDoc, TEXT("TEXT("));
// end
range.iStartPos = iEndPos + 5; // past TEXT(
range.iEndPos = iEndPos + 6;
AddIn_SetSourceSel(hDoc, &range);
AddIn_GetSourceSelText(hDoc, szTmp, sizeof(szTmp)/sizeof(TCHAR));
//AddIn_WriteOutput(g_hwndMain, szTmp);
if (*szTmp == '\"') range.iStartPos = iEndPos + 6;
else range.iEndPos = iEndPos + 5;
AddIn_SetSourceSel(hDoc, &range);
AddIn_ReplaceSourceSelText(hDoc, TEXT(")"));
}
}
3
Beginner questions / Re: How can I create one library file from two file objects?
« Last post by frankie on April 24, 2019, 05:11:46 pm »
On a side note: I see "Posts: 1" under sofandr's reply. The forum software has a bug, hooray ;-)
Yeah!
Seems that forum has 'Option base=0'  ;D
4
Tips & tricks / Re: crtmin
« Last post by TimoVJL on April 24, 2019, 09:00:17 am »
OK. A confusing name.
Maybe the NoCRT.lib is a better name for compiler specific support routines.
5
Beginner questions / Re: How can I create one library file from two file objects?
« Last post by jj2007 on April 24, 2019, 08:38:42 am »
On a side note: I see "Posts: 1" under sofandr's reply. The forum software has a bug, hooray ;-)
6
Tips & tricks / Re: crtmin
« Last post by jj2007 on April 24, 2019, 08:34:56 am »
I am not a fan of the CRT, and don't use it in my libraries. However, if you are programming in Windows, then Msvcrt.dll is present on your machine. It's not an "external" thing that the user has to buy and install, it's simply there waiting to be used.

IMHO rolling your own is justified only if it improves your stuff: Can you reduce code size with an own routine? No, because a call to an existing function costs 6 bytes. Which leaves exactly one reason to reinvent the wheel: speed 8)
7
Beginner questions / Re: How can I create one library file from two file objects?
« Last post by sofandr on April 23, 2019, 10:21:21 pm »
Thank you for help.  It turned out just.  :)
8
Beginner questions / Re: How can I create one library file from two file objects?
« Last post by TimoVJL on April 23, 2019, 07:21:51 pm »
Help tells it:
Quote
You can use POLIB to create a library. When you do, use the following syntax:

POLIB filespec /OUT:library
For example:
Code: [Select]
polib.exe *.obj -out:all.lib
9
Beginner questions / How can I create one library file from two file objects?
« Last post by sofandr on April 23, 2019, 05:58:58 pm »
How can I create one library file from two file objects?
1.obj
2.obj

all.lib

polib.exe ?
10
Tips & tricks / Re: crtmin
« Last post by Vortex on April 23, 2019, 11:56:34 am »
Hi bitcoin,

Another purpose of making a minimalist C run-time library is not to depend on external sources like msvcrt.dll
Pages: [1] 2 3 ... 10