Cygwin/GCC to VC8 conversion question

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Apr 2007
Posts: 13
Reputation: ThomsonGB is an unknown quantity at this point 
Solved Threads: 1
ThomsonGB's Avatar
ThomsonGB ThomsonGB is offline Offline
Newbie Poster

Cygwin/GCC to VC8 conversion question

 
0
  #1
Jul 23rd, 2008
Hi Folk

An aside from the computability issues. I am running into a specific error where the
best solution eludes me. Suggestions please!

I am looking for advice from someone who may have seen this before:

Compiling manifest to resources...
Linking...
sub_proc.obj : error LNK2019: unresolved external symbol __imp__InitializeSecurityDescriptor@8 referenced in function _process_init
Debug/make_msvc.net2003.exe : fatal error LNK1120: 1 unresolved externals
Build log was saved at "file://c:\cygwin\usr\src\make-3.81-2\Debug\BuildLog.htm"
make_msvc.net2003 - 2 error(s), 205 warning(s)
========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========

This is apparently from:
  1. /* We can't use NULL for lpSecurityDescriptor because that
  2. uses the default security descriptor of the calling process.
  3. Instead we use a security descriptor with no DACL. This
  4. allows nonrestricted access to the associated objects. */
  5.  
  6. if (!InitializeSecurityDescriptor((PSECURITY_DESCRIPTOR)(&sd),
  7. SECURITY_DESCRIPTOR_REVISION)) {
  8. pproc->last_err = GetLastError();
  9. pproc->lerrno = E_SCALL;
  10. return((HANDLE)pproc);
  11. }
*ANY IDEAS?*

I love this group and have been reading it for a long time, but rarely posted. I imagine
my posts will be more frequent now that I am working with these tools. Thank all of
you for a great thread.

73
-Grace
NNNN
z
Last edited by Tekmaven; Jul 24th, 2008 at 3:04 am. Reason: Code tags
73s
-Grace
NNNN
z
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 982
Reputation: mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice mitrmkar is just really nice 
Solved Threads: 210
mitrmkar mitrmkar is offline Offline
Posting Shark

Re: Cygwin/GCC to VC8 conversion question

 
0
  #2
Jul 23rd, 2008
Originally Posted by ThomsonGB View Post
Linking...
sub_proc.obj : error LNK2019: unresolved external symbol __imp__InitializeSecurityDescriptor@8 referenced in function _process_init
You need to link with Advapi32.lib.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 13
Reputation: ThomsonGB is an unknown quantity at this point 
Solved Threads: 1
ThomsonGB's Avatar
ThomsonGB ThomsonGB is offline Offline
Newbie Poster

Re: Cygwin/GCC to VC8 conversion question

 
0
  #3
Jul 24th, 2008
Thank you for your response. I am having trouble now locating Advapi32.h and there is no referance to this library in the Cygwin sources (gnu) for this library. I do see an advapi32.h in the Debugging tools or Windows Directory. I see that there is a file named AdvAPI32.Lib in the Platform SDK\Lib folder. Specifically, how should I modify the code to use the appropriate library? 73 -Grace NNNN z
73s
-Grace
NNNN
z
Reply With Quote Quick reply to this message  
Join Date: Dec 2005
Posts: 5,850
Reputation: Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute Salem has a reputation beyond repute 
Solved Threads: 751
Team Colleague
Salem's Avatar
Salem Salem is offline Offline
Void main'ers are DOOMed

Re: Cygwin/GCC to VC8 conversion question

 
0
  #4
Jul 25th, 2008
Using the IDE, navigate as follows (more or less)
Project->settings
Find the linker tab
Find a dialog which says "additional libraries"
Add "AdvAPI32.lib" to the list of libraries already present.

Then build again.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 13
Reputation: ThomsonGB is an unknown quantity at this point 
Solved Threads: 1
ThomsonGB's Avatar
ThomsonGB ThomsonGB is offline Offline
Newbie Poster

Re: Cygwin/GCC to VC8 conversion question

 
0
  #5
Jul 25th, 2008
Thank you very much. I added advapi32.lib to the link by right clicking the
project and clicking "properties". I also change wsprintf to sprintf because
that was not working. magic happened. success. Thanks again!
73
-Grace
NNNN
z
73s
-Grace
NNNN
z
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the C++ Forum


Views: 770 | Replies: 4
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC