LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 02-03-2005, 10:47 PM   #1
amumu
LQ Newbie
 
Registered: Oct 2003
Location: Shanghai, China
Distribution: RedHat9.0
Posts: 18

Rep: Reputation: 0
Cannot find symbol, which is in static library, in a exe file.


Hi,
First, I created a .cpp file with a global variale:

class T
{
};

T t;

then compile this cpp file into a static library (.a file);
then I created another cpp file with a blank "main" function and compile it to a exe file linking with preivous static library I created.

then I tried "nm exefile | grep t", but I failed to find the global variable "t" in this exe file.

Is there someone help on this?

Thank you!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
shared to static library ofada Programming 2 07-08-2009 11:54 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM
Wine cannot find .exe file belibeli Linux - Software 0 05-18-2004 08:16 AM
static linking to c library lantern Programming 1 04-19-2004 08:58 AM
How to use own static library? chuanyung Programming 4 03-10-2004 07:54 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:51 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration