Settings Bug? C++ compiler uses C settings

Discussion about CodeLite development process and patches
brian
CodeLite Enthusiast
Posts: 19
Joined: Sat Jun 04, 2011 6:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Settings Bug? C++ compiler uses C settings

Post by brian »

I submitted this before but the topic evolved to something entirely different.
In Common Settings/General/Compiler I select gnu++
In Common Settings/Compiler/C++ Compiler Options I add the -fpermissive option

I build the project. The build log shows that the g++ compiler is used, but the -fpermissive option is not present and I get an error stating that I need to use that option.

I return to the Common Settings/Compiler/C Compiler Options and add the -fpermissive option there instead.

I build the project. The build shows that the g++ compiler is used and the -fpermissive option is present.

Either I am misunderstanding the meaning of these settings and this the anticipated behavior, or there is some simple bug confusing the settings.
If it is the former, I would like to know to interpret these settings (I need to build a Linux static library that can be used by C++ libraries and Applications).

My linker option settings are empty (of course this is just a static library).
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Settings Bug? C++ compiler uses C settings

Post by eranif »

As usual, when reporting build bugs - please read this:

http://codelite.org/forum/viewtopic.php?f=3&t=804#p3562

Eran
Make sure you have read the HOW TO POST thread
brian
CodeLite Enthusiast
Posts: 19
Joined: Sat Jun 04, 2011 6:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Settings Bug? C++ compiler uses C settings

Post by brian »

Okay, as I stated it may not be a bug but my misunderstanding of the options.

In any case, I am using VirtualBox on Win7-64 with Fedora15-64 installed in VirtualBox

The CodeLite Version is the very latest (just downloaded it two weeks ago). Version is V2.10.0.4778

Its a nice piece of work. You are to be congratulated. This program might actually make me productive on Linux...and that is saying a lot!
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Settings Bug? C++ compiler uses C settings

Post by eranif »

I am missing the build log - can you please paste it here?

Eran
Make sure you have read the HOW TO POST thread
brian
CodeLite Enthusiast
Posts: 19
Joined: Sat Jun 04, 2011 6:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Settings Bug? C++ compiler uses C settings

Post by brian »

Again I missunderstood. When you were talking about 'build log' I was thinking that was in reference to building the project from source code (which I did not do). Sooo:
I just built a project that exhibits this feature and have copied it verbatim. I dont know if it is saved to a file some place. Perhaps it is an option I can set but that I have not yet explored.

Log: (I have used the C compiler settings to set '-fpermissive'. The C++ settings are default (empty). It is long. But the other project has 200 ASN1 files and that it REALLY long!

----------Build Started--------
/bin/sh -c '"make" -j 1 -f "CodeLiteOxpLibraries_wsp.mk"'
----------Building project:[ Association - Debug ]----------
make[1]: Entering directory `/home/brian/oxp_lib/CodeLiteOxpLibraries'
g++ -c "/home/brian/oxp_lib/association/src/AgentFSM.c" -g -fpermissive -o ./Debug/src_AgentFSM.o -I/usr/include -I. -I. -I../include
/home/brian/oxp_lib/association/src/AgentFSM.c: In function ‘eResultCode AgentSendingConfig(sALContext*, eALEvent, sALMessage*)’:
/home/brian/oxp_lib/association/src/AgentFSM.c:498:52: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
/home/brian/oxp_lib/association/src/AgentFSM.c: In function ‘eResultCode AgentWaitingApproval(sALContext*, eALEvent, sALMessage*)’:
/home/brian/oxp_lib/association/src/AgentFSM.c:579:52: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
/home/brian/oxp_lib/association/src/AgentFSM.c:604:57: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
/home/brian/oxp_lib/association/src/AgentFSM.c:638:52: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
/home/brian/oxp_lib/association/src/AgentFSM.c: In function ‘eResultCode AgentOperating(sALContext*, eALEvent, sALMessage*)’:
/home/brian/oxp_lib/association/src/AgentFSM.c:709:52: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
g++ -c "/home/brian/oxp_lib/association/src/Associate.c" -g -fpermissive -o ./Debug/src_Associate.o -I/usr/include -I. -I. -I../include
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:63:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:89:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c: In function ‘eResultCode AL_Create(sALContext**, eALMode)’:
/home/brian/oxp_lib/association/src/Associate.c:126:39: warning: invalid conversion from ‘void*’ to ‘sALContext*’ [-fpermissive]
/home/brian/oxp_lib/association/src/Associate.c:135:102: warning: invalid conversion from ‘eResultCode (*)(sTransportShimHandle, sVirtualChannelHandle, const char*, size_t, APPHANDLE)’ to ‘void*’ [-fpermissive]
../include/Transport/til.h:571:13: warning: initializing argument 2 of ‘eResultCode TCI_AddCallBacksToNexus(sTransportShimHandle, void*, void*, sNexus*, APPHANDLE)’ [-fpermissive]
/home/brian/oxp_lib/association/src/Associate.c:135:102: warning: invalid conversion from ‘eResultCode (*)(sTransportShimHandle, sEvent*, APPHANDLE)’ to ‘void*’ [-fpermissive]
../include/Transport/til.h:571:13: warning: initializing argument 3 of ‘eResultCode TCI_AddCallBacksToNexus(sTransportShimHandle, void*, void*, sNexus*, APPHANDLE)’ [-fpermissive]
/home/brian/oxp_lib/association/src/Associate.c: In function ‘eResultCode AL_RegStandardHandlers(sALContext*, void*, fnApduHandler, fnStateHandler, fnTimeoutHandler)’:
/home/brian/oxp_lib/association/src/Associate.c:213:16: warning: invalid conversion from ‘unsigned int’ to ‘eResultCode’ [-fpermissive]
/home/brian/oxp_lib/association/src/Associate.c: At global scope:
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/Associate.c:458:1: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
g++ -c "/home/brian/oxp_lib/association/src/AssociateMessages.c" -g -fpermissive -o ./Debug/src_AssociateMessages.o -I/usr/include -I. -I. -I../include
/home/brian/oxp_lib/association/src/AssociateMessages.c: In function ‘e_ConfigResult GetConfigResult(char*)’:
/home/brian/oxp_lib/association/src/AssociateMessages.c:134:18: warning: invalid conversion from ‘int’ to ‘e_ConfigResult’ [-fpermissive]
/home/brian/oxp_lib/association/src/AssociateMessages.c: In function ‘void DumpAPDU(sALContext*, int, char*, size_t)’:
/home/brian/oxp_lib/association/src/AssociateMessages.c:191:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:192:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:193:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:194:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:195:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:196:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:197:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:198:80: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:199:88: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c:200:37: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateMessages.c: In function ‘eResultCode TxROER(sALContext*, InvokeIDType_t, e_RoerErrorValue)’:
/home/brian/oxp_lib/association/src/AssociateMessages.c:513:58: warning: invalid conversion from ‘void*’ to ‘uint8_t*’ [-fpermissive]
/home/brian/oxp_lib/association/src/AssociateMessages.c: In function ‘eResultCode EventReceiveHandler(sTransportShimHandle, sEvent*, APPHANDLE)’:
/home/brian/oxp_lib/association/src/AssociateMessages.c:553:9: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
g++ -c "/home/brian/oxp_lib/association/src/AssociateQueue.c" -g -fpermissive -o ./Debug/src_AssociateQueue.o -I/usr/include -I. -I. -I../include
/home/brian/oxp_lib/association/src/AssociateQueue.c: In function ‘void* QThread(void*)’:
/home/brian/oxp_lib/association/src/AssociateQueue.c:163:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateQueue.c:167:17: warning: deprecated conversion from string constant to ‘char*’ [-Wwrite-strings]
/home/brian/oxp_lib/association/src/AssociateQueue.c: In function ‘sALMessage* AllocALEvent(sTransportShimHandle, eALQueueEvent)’:
/home/brian/oxp_lib/association/src/AssociateQueue.c:196:48: warning: invalid conversion from ‘void*’ to ‘sALMessage*’ [-fpermissive]
/home/brian/oxp_lib/association/src/AssociateQueue.c: In function ‘sALMessage* AllocALMessage(sTransportShimHandle, sVirtualChannelHandle, char*, size_t, sQoS*, int)’:
/home/brian/oxp_lib/association/src/AssociateQueue.c:232:83: warning: invalid conversion from ‘void*’ to ‘sALMessage*’ [-fpermissive]
g++ -c "/home/brian/oxp_lib/association/src/AssociateTimeout.c" -g -fpermissive -o ./Debug/src_AssociateTimeout.o -I/usr/include -I. -I. -I../include
/home/brian/oxp_lib/association/src/AssociateTimeout.c: In function ‘sALTimeout* AllocALTimeout(unsigned int, unsigned int, unsigned int)’:
/home/brian/oxp_lib/association/src/AssociateTimeout.c:127:56: warning: invalid conversion from ‘void*’ to ‘sALTimeout*’ [-fpermissive]
g++ -c "/home/brian/oxp_lib/association/src/ManagerFSM.c" -g -fpermissive -o ./Debug/src_ManagerFSM.o -I/usr/include -I. -I. -I../include
/home/brian/oxp_lib/association/src/ManagerFSM.c: In function ‘eResultCode MgrWaitingConfig(sALContext*, eALEvent, sALMessage*)’:
/home/brian/oxp_lib/association/src/ManagerFSM.c:410:52: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
/home/brian/oxp_lib/association/src/ManagerFSM.c: In function ‘eResultCode MgrCheckingConfig(sALContext*, eALEvent, sALMessage*)’:
/home/brian/oxp_lib/association/src/ManagerFSM.c:571:52: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
/home/brian/oxp_lib/association/src/ManagerFSM.c:592:57: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
/home/brian/oxp_lib/association/src/ManagerFSM.c: In function ‘eResultCode MgrOperating(sALContext*, eALEvent, sALMessage*)’:
/home/brian/oxp_lib/association/src/ManagerFSM.c:682:52: warning: comparison between ‘message_PR’ and ‘enum<anonymous>’ [-Wenum-compare]
ar rcus ./Debug/libAssociation.a ./Debug/src_AgentFSM.o ./Debug/src_Associate.o ./Debug/src_AssociateMessages.o ./Debug/src_AssociateQueue.o ./Debug/src_AssociateTimeout.o ./Debug/src_ManagerFSM.o
Executing Post Build commands ...
cp ./Debug/libAssociation.a ../lib/
Done
make[1]: Leaving directory `/home/brian/oxp_lib/CodeLiteOxpLibraries'
----------Build Ended----------
0 errors, 75 warnings
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Settings Bug? C++ compiler uses C settings

Post by eranif »

Go to :

'Settings | Build Settings | Compilers | gnu g++ | Tools '

and make sure that the entry 'C Compiler Name' is set to 'gcc'

Next, verify that the file type 'c' is handled correctly by checking this:

'Settings | Build Settings | Compilers | gnu g++ | File Types'

and under the 'c' file type, make sure that the pattern is similar to:

Code: Select all

$(C_CompilerName) $(SourceSwitch) "$(FileFullPath)" $(C_CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/$(ObjectName)$(ObjectSuffix) $(IncludePath)
In any case, please paste here the pattern used by codelite for the 'C' file type (taken from above)

Eran
Make sure you have read the HOW TO POST thread
brian
CodeLite Enthusiast
Posts: 19
Joined: Sat Jun 04, 2011 6:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Settings Bug? C++ compiler uses C settings

Post by brian »

Well, it was not set to gcc but to g++. That fixed the problem and also some funny compile issues I had.

Thanks.
Post Reply