Continue to Site

Welcome to MCAD Central

Join our MCAD Central community forums, the largest resource for MCAD (Mechanical Computer-Aided Design) professionals, including files, forums, jobs, articles, calendar, and more.

Linker Error on comipiling EXE file

Shridharaswamy

New member
Hi:

I get an linker error on compiling only the Exe file. Ie

If I give
make -f make_proe

I get an error. But make -0f make_proe dll compiles fine and I get a dll file. Can any one help me solve this problem. I am posting the complete error message after compiling Wildfire 3.0 on Linux.



PROTOOL_SRC = /usr/local/ptc/proeWildfire3.0/protoolkit/
PROTOOL_SYS = /usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux
gcc -o pt_install_proe UserInit.o TestError.o TestRunmode.o UtilString.o TestMenubar.o TestMenu.o TestMessage.o /usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a -lm -ldl -lc
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctfileutil.o): In function `pro_temp_fname_str':
ctfileutil.c:(.text+0xb7a4): warning: the use of `tempnam' is dangerous, better use `mkstemp'
TestMenu.o: In function `ProTestMenus':
TestMenu.c:(.text+0x6b): undefined reference to `ProUtilMsgPrint'
TestMenu.o: In function `ProTestMenuPremode':
TestMenu.c:(.text+0x986): undefined reference to `ProUtilMsgPrint'
TestMenu.o: In function `ProTestMenuPostmode':
TestMenu.c:(.text+0xa5e): undefined reference to `ProUtilMsgPrint'
TestMenu.o: In function `ProTestMenuAction':
TestMenu.c:(.text+0xb98): undefined reference to `ProUtilMsgPrint'
TestMenu.c:(.text+0xec9): undefined reference to `ProUtilMsgPrint'
TestMenu.o:TestMenu.c:(.text+0xfd0): more undefined references to `ProUtilMsgPrint' follow
TestMenu.o: In function `ProTestMacro':
TestMenu.c:(.text+0xff0): undefined reference to `ProUtilStringGet'
TestMessage.o: In function `ProTestMessage':
TestMessage.c:(.text+0x4b): undefined reference to `ProUtilMsgPrint'
TestMessage.c:(.text+0x12e): undefined reference to `ProUtilMsgPrint'
TestMessage.c:(.text+0x211): undefined reference to `ProUtilMsgPrint'
TestMessage.c:(.text+0x2f8): undefined reference to `ProUtilMsgPrint'
TestMessage.c:(.text+0x3ce): undefined reference to `ProUtilMsgPrint'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctmisc.o): In function `set_trail_substitution':
ctmisc.c:(.text+0x657d): undefined reference to `__ctype_b'
ctmisc.c:(.text+0x6609): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctmisc.o): In function `getenv_return_rest_of_string':
ctmisc.c:(.text+0x67cc): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctpfa.o): In function `pfa_parse_PRIVATE_in_ctpfa':
ctpfa.c:(.text+0x10439): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctpfa_mt.o): In function `is_vers_string':
ctpfa_mt.c:(.text+0x11): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctpfa_mt.o):ctpfa_mt.c:(.text+0x40): more undefined references to `__ctype_b' follow
collect2: ld returned 1 exit status
make: *** [pt_install_proe] Error 1
 
Well, you have undefined references to ProUtilmsgPring. Therefore the exe is not linking in the .o file for the file that defines that function.
 
Hi:


This happens even without using these functions. Here is a simple case.

PROTOOL_SRC = /usr/local/ptc/proeWildfire3.0/protoolkit/
PROTOOL_SYS = /usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux
gcc -o pt_install_proe UserInit.o TestError.o TestRunmode.o UtilString.o /usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a -lm -ldl -lc
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctfileutil.o): In function `pro_temp_fname_str':
ctfileutil.c:(.text+0xb7a4): warning: the use of `tempnam' is dangerous, better use `mkstemp'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctmisc.o): In function `set_trail_substitution':
ctmisc.c:(.text+0x657d): undefined reference to `__ctype_b'
ctmisc.c:(.text+0x6609): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctmisc.o): In function `getenv_return_rest_of_string':
ctmisc.c:(.text+0x67cc): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctpfa.o): In function `pfa_parse_PRIVATE_in_ctpfa':
ctpfa.c:(.text+0x10439): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctpfa_mt.o): In function `is_vers_string':
ctpfa_mt.c:(.text+0x11): undefined reference to `__ctype_b'
/usr/local/ptc/proeWildfire3.0/protoolkit//i486_linux/obj/pr otoolkit.a(ctpfa_mt.o):ctpfa_mt.c:(.text+0x40): more undefined references to `__ctype_b' follow
collect2: ld returned 1 exit status
make: *** [pt_install_proe] Error 1

Thanks for your help

Regards,
Shridhara
 
I think you may have to do a Google search for __ctype_b on Linux. I found several issues when I did the search. Sorry I can't help any further.
 
Thanks Williaps:

The problem was with Glibc file, I am able to synchrously start proe, but nothing much of my executable files run. I dont get any Menus that I have written. I get a debug error stating some serious problem.

I would love to have started and linking my code with Pro/E

Thanks
Regards
Shridhara
 
I have a doubt about the message file. I am continuing to use the default text directory.

text_dir /usr/local/ptc/proeWildfire3.0/protoolkit/protk_appls/pt_ins tall_test/text


for all the execuatbles that I have created. What is a text file should I create a new one for each execuatble. The text directory lists all these files in it.


chinese_cn french htmljapanese spanish
chinese_tw german italian koreanusascii


I thought that text_dir is not that important. How do I create a text_dir.

All of my code is ini a directory named /proe.

Thanks,
Shridhara
 
Here is my protk.dat file

name pt_install_proe

exec_file pt_install_proe
Allow_stop True
Delay_start False
text_dir /usr/local/ptc/proeWildfire3.0/protoolkit/protk_appls/pt_ins tall_test
revision Wildfire
end
 
I get this message as I stop & Start in Tools-Auxillary Programs

dbg_err_crash() -continuing froom seriuos error (ORDER_DEBUG)
Application "pt_examples" started successfully
 
A text directory is EXTREMELY important. You need to back up and read the API Wizard under the User's Guide. You need to crawl before you can walk.


A text directory holds all of your application's message file(s). You should NOT put them all in the same directory.
 

Sponsor

Articles From 3DCAD World

Back
Top