compiler-construction

G++ compiler cannot distinguish variable and function with the same name? [duplicate]

牧云@^-^@ 提交于 2020-02-02 11:16:22
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Class method and variable with same name, compile error in C++ not in Java? The G++ compiler would complain when my class member name and member function name are the same. It seems that whenever a variable name happens to be the same as a function name, the compiler would complain. In Java, it is not the case. I just wonder why the G++ compiler cannot distinguish a variable name from a function name since the

G++ compiler cannot distinguish variable and function with the same name? [duplicate]

断了今生、忘了曾经 提交于 2020-02-02 11:14:04
问题 This question already has answers here : Closed 8 years ago . Possible Duplicate: Class method and variable with same name, compile error in C++ not in Java? The G++ compiler would complain when my class member name and member function name are the same. It seems that whenever a variable name happens to be the same as a function name, the compiler would complain. In Java, it is not the case. I just wonder why the G++ compiler cannot distinguish a variable name from a function name since the

Change linker order in CodeBlocks

别等时光非礼了梦想. 提交于 2020-02-02 06:26:46
问题 I have a project in DialogBlocks 5.03 that compiles fine with mingw32, but using CodeBlocks 13.12 show this error: F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1019): undefined reference to `ImageList_GetImageCount@4' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1063): undefined reference to `ImageList_Draw@24' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl

Change linker order in CodeBlocks

我的梦境 提交于 2020-02-02 06:26:26
问题 I have a project in DialogBlocks 5.03 that compiles fine with mingw32, but using CodeBlocks 13.12 show this error: F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1019): undefined reference to `ImageList_GetImageCount@4' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1063): undefined reference to `ImageList_Draw@24' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl

Change linker order in CodeBlocks

ぃ、小莉子 提交于 2020-02-02 06:26:18
问题 I have a project in DialogBlocks 5.03 that compiles fine with mingw32, but using CodeBlocks 13.12 show this error: F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1019): undefined reference to `ImageList_GetImageCount@4' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1063): undefined reference to `ImageList_Draw@24' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl

Change linker order in CodeBlocks

空扰寡人 提交于 2020-02-02 06:25:12
问题 I have a project in DialogBlocks 5.03 that compiles fine with mingw32, but using CodeBlocks 13.12 show this error: F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1019): undefined reference to `ImageList_GetImageCount@4' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl.cpp:(.text+0x1063): undefined reference to `ImageList_Draw@24' F:\wxWidgets-3.0.0\lib\gcc_lib/libwxmsw30u_core.a(corelib_msw_listctrl.o):listctrl

Conversion to Automatic Reference Counting (ARC): 'Use of undeclared identifier' errors

时光毁灭记忆、已成空白 提交于 2020-01-31 15:23:09
问题 In one of the very big projects I used auto-synthesized properties everywhere: //MyClass.h file: @interface MyClass : NSObject @property (nonatomic, retain) NSString *deviceName; @property (nonatomic, retain) NSString *deviceID; @end //MyClass.m file: #import "MyClass.h" @implementation ApplicationStatus // no @synthesize used at all. -(void)dealloc{ [_deviceName release]; // gives errors only while converting to ARC with LLVM 5.0 [_deviceID release]; [super dealloc]; } @end The code above

How to tell whether an executable was compiled for the present machine?

不打扰是莪最后的温柔 提交于 2020-01-30 06:48:07
问题 I have some c code that I compile and run, in a directory that is accessible from many different unix computers (various linux and mac, occasionally others), with different OS's obviously needing different executables. I have a simple shell script that invokes the appropriate executable, prog.$OSTYPE.$MACHTYPE , compiling it first if necessary. This is very simple (although it requires using csh in order to have $OSTYPE and $MACHTYPE be reliably defined) and it almost works. However, it turns

How to tell whether an executable was compiled for the present machine?

孤者浪人 提交于 2020-01-30 06:45:13
问题 I have some c code that I compile and run, in a directory that is accessible from many different unix computers (various linux and mac, occasionally others), with different OS's obviously needing different executables. I have a simple shell script that invokes the appropriate executable, prog.$OSTYPE.$MACHTYPE , compiling it first if necessary. This is very simple (although it requires using csh in order to have $OSTYPE and $MACHTYPE be reliably defined) and it almost works. However, it turns

Is it possible to turn off support for “and” / “or” boolean operator usage in gcc?

坚强是说给别人听的谎言 提交于 2020-01-28 02:16:25
问题 GCC seems to allow "and" / "or" to be used instead of "&&" / "||" in C++ code; however, as I expected, many compilers (notably MSVC 7) do not support this. The fact that GCC allows this has caused some annoyances for us in that we have different developers working on the same code base on multiple platforms and occasionally, these "errors" slip in as people are switching back and forth between Python and C++ development. Ideally, we would all remember to use the appropriate syntax, but for