Author Topic: Codeblock build problem  (Read 9282 times)

Offline lakersfan74

  • Single posting newcomer
  • *
  • Posts: 9
Codeblock build problem
« on: January 24, 2009, 01:34:07 pm »
Hello,
      I m using codeblock in Ubuntu using GCC compiler. My project compilation succeeds but when I run the program it says the project hasnt been build. Do you want to build it again. I then enabled the debug log, and I get this:

g++ /TP /Gd /GF /W3 /Zc:wchar_t /EHsc /DWIN32 /D__WIN32__ /D__WXMSW__ /D_WINDOWS /D_CRT_SECURE_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE /D_VC80_UPGRADE=0x0600 /DwxUSE_PROTOCOL_HTTP  -W -g -O0 -I/usr/local/lib/wx/include/gtk2-unicode-debug-2.8 -I/usr/local/include/wx-2.8 -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES -D__WXDEBUG__ -D__WXGTK__ -pthread  -D_DEBUG -D_LIB -D__LINUX__ -DUNICODE -D_UNICODE    -I/home/bmani/devtools/wxGTK-2.8.9/include -I/home/bmani/devtools/wxGTK-2.8.9/contrib/include -I../MbCore/Include -I../MbMemory/Include -I../MbSQLite/MbSQLite/Inc -I../MbXML/MbXML/Inc -I/home/bmani/devtools/wxGTK-2.8.9/lib/wx/include/gtk2-unicode-debug-2.8 -I/home/bmani/devtools/wxGTK-2.8.9/include  -c "/media/FreeAgent Drive/Tim/NewAutoUpdater/AU_DBUtil.cpp" -o obj/Linux/debug/AU_DBUtil.o
g++: /TP: No such file or directory
g++: /Gd: No such file or directory
g++: /GF: No such file or directory
g++: /W3: No such file or directory
g++: /Zc:wchar_t: No such file or directory
g++: /EHsc: No such file or directory
g++: /DWIN32: No such file or directory
g++: /D__WIN32__: No such file or directory
g++: /D__WXMSW__: No such file or directory
g++: /D_WINDOWS: No such file or directory
g++: /D_CRT_SECURE_DEPRECATE: No such file or directory
g++: /D_CRT_NONSTDC_NO_DEPRECATE: No such file or directory
g++: /D_VC80_UPGRADE=0x0600: No such file or directory
g++: /DwxUSE_PROTOCOL_HTTP: No such file or directory
In file included from /media/FreeAgent Drive/Tim/NewAutoUpdater/AU_DBUtil.h:15,
                 from /media/FreeAgent Drive/Tim/NewAutoUpdater/AU_DBUtil.cpp:13:
../MbSQLite/MbSQLite/Inc/MB_SQLite3.h:110: warning: type qualifiers ignored on function return type
/media/FreeAgent Drive/Tim/NewAutoUpdater/AU_DBUtil.cpp: In member function ‘bool cAUDBUtil::WriteToDB(std::list<cAULocalResource, std::allocator<cAULocalResource> >&)’:
/media/FreeAgent Drive/Tim/NewAutoUpdater/AU_DBUtil.cpp:145: warning: deprecated conversion from string constant to ‘char*’
Process terminated with status 1 (0 minutes, 1 seconds)
0 errors, 2 warnings

Any Help.. Am I missing anything?

Thanks,
Bharani

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Codeblock build problem
« Reply #1 on: January 24, 2009, 01:50:05 pm »
Any Help.. Am I missing anything?

Yes !

Lack of knowledge about your compiler and about importing projects.

You mix options of different compilers and platforms.

That can never work.

You use options for a windows-compiler (I guess Visual Studio xx) with gcc/g++ for Linux.

Clear up your project and make sure the options are okay and then ask again.

It might be a good idea to create a project, as similar as possible to the one you try to build, with the scripted wizard and look at the projects properties and build options.

And remove all settings from the global compiler options ("Settings -> Compiler and debugger -> Global compiler settings"), you don't understand or you are not absolutely sure that you need them for all projects you want to compile with the specific compiler.

Offline lakersfan74

  • Single posting newcomer
  • *
  • Posts: 9
Re: Codeblock build problem
« Reply #2 on: January 26, 2009, 07:37:07 am »
Actually I didnt mix up any build options.. I created a new build target Debug Linux, and added the following build options.

compiler flag:

 produce debug symbols, Enable standard compiler warnings.

Other options:

`wx-config --cxxflags`

#defines
__UBUNTU_FLAG__ (this is my app specific)

Linker Options
`wx-config --libs`

Selected Compiler: GNU GCC Compiler.

In Global Compiler settings:
no option is selected

Thanks,
Bharani

Offline lakersfan74

  • Single posting newcomer
  • *
  • Posts: 9
Re: Codeblock build problem
« Reply #3 on: January 26, 2009, 08:00:57 am »
This is in sequel to my previous reply.  The project is not compiling as I dont see any object files for the .cpp files. But If I build the .cpp files it builds and object files are created. After building the files individually If I build the project I get this:

-------------- Build: Debug Linux in Updater ---------------

Skipping file (no compiler program set): resource.rc
g++ -L/home/bmani/boost_1_37_0/lib -L/home/bmani/devtools/wxGTK-2.8.9 -Lbin/Debug  -o bin/Linux/debug/NewAutoUpdater obj/Linux/debug/AU_Config.o obj/Linux/debug/AU_DBUtil.o obj/Linux/debug/AU_FileUtil.o obj/Linux/debug/AU_LocalResource.o obj/Linux/debug/AU_RemoteResource.o obj/Linux/debug/AU_URLEncoder.o obj/Linux/debug/AU_XMLUtil.o obj/Linux/debug/TCR_ClientConfig.o obj/Linux/debug/UpdaterApp.o obj/Linux/debug/UpdaterMain.o   /INCREMENTAL:NO /SUBSYSTEM:WINDOWS -L/usr/local/lib -pthread   -lwx_gtk2ud_richtext-2.8 -lwx_gtk2ud_aui-2.8 -lwx_gtk2ud_xrc-2.8 -lwx_gtk2ud_qa-2.8 -lwx_gtk2ud_html-2.8 -lwx_gtk2ud_adv-2.8 -lwx_gtk2ud_core-2.8 -lwx_baseud_xml-2.8 -lwx_baseud_net-2.8 -lwx_baseud-2.8    -lwinmm.lib -lrpcrt4.lib -lkernel32.lib -luser32.lib -lgdi32.lib -lwinspool.lib -lcomdlg32.lib -ladvapi32.lib -lshell32.lib -lole32.lib -loleaut32.lib -luuid.lib -lcomctl32.lib -lwsock32.lib -lodbc32.lib -lMbCore.lib -lMbMemory.lib -lMbXML.lib -lpsapi.lib -lzdll.lib -lMbSQLite.lib -lMbCore -lMbMemory -lMbSQLite -lMbXML
g++: /INCREMENTAL:NO: No such file or directory
g++: /SUBSYSTEM:WINDOWS: No such file or directory
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

If you look at it, you will see .lib  win32 files included. I checked the Linker Options , Link Libraries and I dont see any .lib files there. Is it because I also have Debug Win32 build target??..

Thanks,
Bharani

Offline Jenna

  • Administrator
  • Lives here!
  • *****
  • Posts: 7255
Re: Codeblock build problem
« Reply #4 on: January 26, 2009, 09:32:12 am »
If you look at it, you will see .lib  win32 files included. I checked the Linker Options , Link Libraries and I dont see any .lib files there. Is it because I also have Debug Win32 build target??..

That should not matter, as long as you don't have made settings, that are global to your project, even if they only matter for a special (in your case windows) target.

And of course did you follow this instruction:
And remove all settings from the global compiler options ("Settings -> Compiler and debugger -> Global compiler settings"), you don't understand or you are not absolutely sure that you need them for all projects you want to compile with the specific compiler.