Build produces no objects or library

CodeLite installation/troubleshooting forum
brian
CodeLite Enthusiast
Posts: 19
Joined: Sat Jun 04, 2011 6:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Build produces no objects or library

Post by brian »

I have a very simple C project for building a shared (*.so) library.
I configure the projects similar to other CodeLite projects I have on the same system (but different workspace).
I click on build and see the following:

gcc -c "/home/brian/Projects/LibUsbAdapter/LibUsbDriver.c" -g -fPIC -o ./Debug/LibUsbAdapter_LibUsbDriver.o -I. -I. -I../include
gcc -c "/home/brian/Projects/LibUsbAdapter/LibUsbAdapter.c" -g -fPIC -o ./Debug/LibUsbAdapter_LibUsbAdapter.o -I. -I. -I../include

But I look in the Debug directory and there is nothing there.
So clearly the following happens as the build attempts to continue:

g++ -shared -fPIC -o ./Debug/LibUsbAdapter.so ./Debug/LibUsbAdapter_LibUsbAdapter.o ./Debug/LibUsbAdapter_LibUsbDriver.o -L. -l-rt -l-udev -l-usb
g++: error: ./Debug/LibUsbAdapter_LibUsbAdapter.o: No such file or directory
g++: error: ./Debug/LibUsbAdapter_LibUsbDriver.o: No such file or directory
make[1]: *** [Debug/LibUsbAdapter.so] Error 1
make[1]: Leaving directory `/home/brian/Projects/LibUsbAdapter/LibUsbAdapter'

For a test I make an obvious syntax error in the C source code.
I run rebuild (also repeated with just compile!)
No error reported (but the file is saved) and output window looks fine.

I have configured about 6 CodeLite C and C++ projects on Linux and I have done this exact project on other Linux systems and they work fine.

What stupid gaff could I possibly be doing that makes it so the build looks prefect in the output window but not even a syntax error is detected?
Clearly no build is getting executed.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build produces no objects or library

Post by eranif »

brian wrote:What stupid gaff could I possibly be doing that makes it so the build looks prefect in the output window but not even a syntax error is detected?
1) Please state your codelite version and where you get it from
2) OS (even the linux distro)
3) Post the *full* build log as described here:

http://codelite.org/forum/viewtopic.php ... &sk=t&sd=a

Eran
Make sure you have read the HOW TO POST thread
dhollm
CodeLite Curious
Posts: 2
Joined: Tue Jul 12, 2011 12:44 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build produces no objects or library

Post by dhollm »

I seem to be having the same problem... In the messages window, it says "build ended successfully" but numerous errors were shown in the output window.

Its Codelite 2.10.0.4778, on WInXP, which I installed after downloading. I am not sure of the cause, but this started ocurring after I installed this version over some prior version (however I am not sure what version that was -- but it was probably from at least 8-9 months ago).

Here is an example:

----------Build Started--------
C:\WINDOWS\system32\cmd.exe /c ""mingw32-make.exe" -j 2 -f "genmath2.mk" ./Debug/mathexp.o"
----------Building project:[ genmath2 - Debug ] (Single File Build)----------
g++ -c "X:/project/mathexp.cpp" -g -o ./Debug/mathexp.o -I. -I.
In file included from X:/project/mathexp.cpp:9:
X:/project/mathexp.h:21: error: expected unqualified-id before string constant
X:/project/mathexp.h:21: error: expected ')' before string constant
X:/project/mathexp.cpp: In member function 'std::string mathexp::CreateRandomExpr(unsigned int) const':
X:/project/mathexp.cpp:217: error: no match for 'operator+' in 'mathexp::symbols + ((const mathexp*)this)->mathexp::variables'
X:/project/mathexp.cpp:220: error: 'rand' was not declared in this scope
X:/project/mathexp.cpp:222: error: 'uint' was not declared in this scope
X:/project/mathexp.cpp:222: error: expected ';' before 'i'
X:/project/mathexp.cpp:222: error: 'i' was not declared in this scope
mingw32-make.exe: *** [Debug/mathexp.o] Error 1
----------Build Ended----------
0 errors, 0 warnings


Thanks!
dhollm
CodeLite Curious
Posts: 2
Joined: Tue Jul 12, 2011 12:44 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build produces no objects or library

Post by dhollm »

Just to follow up with a little more info...

I just read in another post that someone had a similar-seeming issue because of spaces in their paths. So I created a brand new workspace and new project with the simplest space-less path I could think of, and using the very same source code files the errors were correctly identified in the build output!

However, I have been unable to deliberately reproduce the problem by creating workspaces with spaces. But perhaps this is still a useful lead.

David
brian
CodeLite Enthusiast
Posts: 19
Joined: Sat Jun 04, 2011 6:22 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build produces no objects or library

Post by brian »

Okay, I will do that but I am on my home system and here everything works perfectly. In both cases I am using Virtual Box with Fedora 15. Here (at home) its Windows7 64 host (and Fedora 64 guest in Virtual Box). Where I have the problem its Windows 7 32 host and Fedora 32. The projects are the same via a remote git repository. I will grab the build logs when I get to the other system.
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build produces no objects or library

Post by eranif »

Seems like my previous post got lost...

Try this:
- Stop codelite
- Rename the folder %appdata%\CodeLite into %appdata%\CodeLite.1
- Start codelite and try it again

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: Build produces no objects or library

Post by brian »

Eran,

That sounds like something appropriate for Windows. I am using CodeLite in Linux in VirtualBox (because I have been spoiled by VS and need a respectable IDE to get any work done)! In Linux there is a .codelite folder in my user folder. Should I rename that?

Brian
User avatar
eranif
CodeLite Plugin
Posts: 6375
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build produces no objects or library

Post by eranif »

Yea, I got confused because dhollm hijacked your post... and he is using Windows XP ;)
brian wrote:n Linux there is a .codelite folder
Yes, this is the one

BTW, I still did not see the complete output of your build...

Eran
Make sure you have read the HOW TO POST thread
Post Reply