473,320 Members | 2,003 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Error using USER_LDFLAGS in executable make file

bajajv
152 100+
hi,

In my make file, I need to give USER_LDFLAGS.

I am trying to make an executable, but if I give USER_LDFLAGS as -

USER_LDFLAGS = -L... (libraries) it gives errors

and if I give it as -

USER_LDFLAGS = -shared -L... (libraries)

it creates a shared library.

Any idea what could be the reason, I can't give more details about the libraries for obvious reasons.. :(

Thanks.
Jan 9 '13 #1

✓ answered by Banfa

Does your make output the actual linker command it uses? it would be useful to see that.

Are you sure that your linker command includes all the correct object and library files in the correct order?

5 2331
Banfa
9,065 Expert Mod 8TB
Given that you have not told us what compiler toolset or platform you are using or what errors occured we don't really have all (any of) the information required to give an answer.

However assuming a fairly normal compiler toolset (gcc) and taking a guess then:

What are you using -L for? -L is the option to set the library search path, are you sure you didn't mean -l which is the switch to link a library into your executable?
Jan 9 '13 #2
bajajv
152 100+
Hi Banfa,

These are the compiler and platform infos -
$gcc --version
gcc (GCC) 4.2.3

And in makefile, I am giving -
USER_LDFLAGS = -L$(HOME_DIR)/gmrACE-5.6-32/lib -lACE-5.6
If I do not give USER_LDFLAGS, it gives many errors for not finding ACE APIs.

Currently I am getting errors like this -

obj_rel_Linux_32/file_name.o:(.gnu.linkonce.d.rel.ro._ZTV28SOME_NAM E+0x284): undefined reference to `non-virtual thunk to MyClass::update(ObserverSubject const*)'

Proj_Dir/lib/Linux_32/lib_name_hs.so: undefined reference to `Base_Class_of_MyClass::handleRequest(Object_Store &, short)'

Proj_Dir/lib/Linux_32/lib_name_hs.so: undefined reference to `non-virtual thunk to Base_Class_of_MyClass::handleRequest(Object_Store& , short)'

collect2: ld returned 1 exit status

I do not get these errors, when I give -shared in USER_LDFLAGS. But it results in creating library. I want to create an executable.

Hope this info helps.

Thanks.
Jan 10 '13 #3
bajajv
152 100+
hi.. can anyone please give some suggestions how to move further, because I am really stuck at this..

Thanks.
Jan 11 '13 #4
Banfa
9,065 Expert Mod 8TB
Does your make output the actual linker command it uses? it would be useful to see that.

Are you sure that your linker command includes all the correct object and library files in the correct order?
Jan 11 '13 #5
bajajv
152 100+
Hi Banfa,

Yaa, the problem was in ordering the libraries. It is working now.

Thanks for the help.
Jan 14 '13 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: Wayne Gibson | last post by:
Hi all, Please ignore the other post.. The cat jumped on the machine and sent it before I could stop it!! Was wondering if anybody has expericence this problem.. I am writting an application...
1
by: elziko | last post by:
Hi, I'm using the following code to create a user: Dim strNodeName As String = "test user" Dim NewUser As DirectoryEntry Dim AD As New DirectoryEntry("WinNT://MYCOMPUTER") 'delete user...
13
by: Mark A. Odell | last post by:
I write a lot of drivers and there is inevitably some hardware register or buffer descriptor field called 'flags'. The flags are defined, typically, as bit positions. I was thinking I could get...
3
by: Lekyan | last post by:
I have problem setting the password for an ADAM user using C#. I used the SetPassword code given in the Microsoft page, changed several parameters, but ran into an exception. I wonder if other...
3
by: Ignacio X. Domínguez | last post by:
Hi. I'm using the | operator to use multiple flags in a variable. For example: const int flag1 = 0x00000001; const int flag2 = 0x00000002; const int flag3 = 0x00000004; int Flags = flag2 |...
2
by: Technical Group | last post by:
Friends, Can anybody help me out by sending a piece of C# code showing how to add an active directory user to a particular user group? If the group does not exist, then create it. Thanks in...
6
by: Jan Nielsen | last post by:
In an aspx web page, I'm trying to read out some attributes regarding password settings like UF_PASSWD_NOTREQD, UF_PASSWD_CANT_CHANGE, UF_DONT_EXPIRE_PASSWD and UF_PASSWORD_EXPIRED. According to...
0
by: aloneplayer | last post by:
Hi, All, I wrote a function to share a folder to individual user account with WMI. When I call it : ShareFolder("c:\\test", "Test", "Shared by Riven", 8, Environment.MachineName,...
1
by: Alexander Korsunsky | last post by:
Hi! Is it possible to extract the mode flags of a stream (FILE* stream or fstream - object), without looking at how the stream was opened? What I mean by mode flags is wether the stream is opened...
1
by: bryonb | last post by:
I'm calling win32netcon.NetUserAdd() to create a user to run a service. However, when I try and start the service I get an error. According to the event log the user account is expired. I'm...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.