Connecting Tech Pros Worldwide Help | Site Map
 
 
LinkBack Thread Tools Search this Thread
  #1  
Old September 20th, 2006, 08:25 PM
eberesche
Guest
 
Posts: n/a
Default Linking ASN.1 - components in C ++ - error LNK2001-

Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:

------ Build started: Project: testext, Configuration: Debug Win32
------

Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals

Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)

I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?

Many thanks beforehand

--eberesche--

  #2  
Old September 20th, 2006, 08:35 PM
Moonlit
Guest
 
Posts: n/a
Default Re: Linking ASN.1 - components in C ++ - error LNK2001-

Hi

I haven't used the asn.1 compiler myself. But looking at the messages you
seem to be missing functions to print the standard asn.1 tags like integer,
sequence etc.

I could imagine (since I guess these would be the same for any asn.1
program) there is a library around with these functions/variables. Isn't
there a .lib file around. If there is you can add it to additional
dependencies in the 'linker input' tree node of the configuration dialog.


Regards, Ron AF Greve

http://moonlit.xs4all.nl

"eberesche" <herbert.schwarz@biddysoft.comwrote in message
news:1158781152.879447.176000@d34g2000cwd.googlegr oups.com...
Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:

------ Build started: Project: testext, Configuration: Debug Win32
------

Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals

Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)

I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?

Many thanks beforehand

--eberesche--


  #3  
Old September 20th, 2006, 08:55 PM
eberesche
Guest
 
Posts: n/a
Default Re: Linking ASN.1 - components in C ++ - error LNK2001-

Moonlit schrieb:
Quote:
Hi
>
I haven't used the asn.1 compiler myself. But looking at the messages you
seem to be missing functions to print the standard asn.1 tags like integer,
sequence etc.
>
I could imagine (since I guess these would be the same for any asn.1
program) there is a library around with these functions/variables. Isn't
there a .lib file around. If there is you can add it to additional
dependencies in the 'linker input' tree node of the configuration dialog.
>
>
Regards, Ron AF Greve
>
http://moonlit.xs4all.nl
>
"eberesche" <herbert.schwarz@biddysoft.comwrote in message
news:1158781152.879447.176000@d34g2000cwd.googlegr oups.com...
Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:
>
------ Build started: Project: testext, Configuration: Debug Win32
------
>
Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals
>
Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)
>
I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?
>
Many thanks beforehand
>
--eberesche--
This went fast Ron:-)), I had already supposed this. Besides, does it
concern standard - libraries from the scope of supply of MS
VisualStudio ? Tomorrow morning I will immediately test this.
Thank you
--eberesche--

  #4  
Old September 20th, 2006, 10:45 PM
Default User
Guest
 
Posts: n/a
Default Re: Linking ASN.1 - components in C ++ - error LNK2001- [TPA}

Moonlit wrote:
Quote:
Hi
--
Please don't top-post. Your replies belong following or interspersed
with properly trimmed quotes. See the majority of other posts in the
newsgroup, or the group FAQ list:
<http://www.parashift.com/c++-faq-lite/how-to-post.html>
  #5  
Old September 21st, 2006, 08:15 PM
Moonlit
Guest
 
Posts: n/a
Default Re: Linking ASN.1 - components in C ++ - error LNK2001-

Hi,






"eberesche" <herbert.schwarz@biddysoft.comwrote in message
news:1158782724.836342.140170@m73g2000cwd.googlegr oups.com...
Moonlit schrieb:
Quote:
Hi
>
I haven't used the asn.1 compiler myself. But looking at the messages you
seem to be missing functions to print the standard asn.1 tags like
integer,
sequence etc.
>
I could imagine (since I guess these would be the same for any asn.1
program) there is a library around with these functions/variables. Isn't
there a .lib file around. If there is you can add it to additional
dependencies in the 'linker input' tree node of the configuration dialog.
>
>
Regards, Ron AF Greve
>
http://moonlit.xs4all.nl
>
"eberesche" <herbert.schwarz@biddysoft.comwrote in message
news:1158781152.879447.176000@d34g2000cwd.googlegr oups.com...
Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:
>
------ Build started: Project: testext, Configuration: Debug Win32
------
>
Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals
>
Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)
>
I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?
>
Many thanks beforehand
>
--eberesche--
=This went fast Ron:-)), I had already supposed this. Besides, does it
=concern standard - libraries from the scope of supply of MS
=VisualStudio ? Tomorrow morning I will immediately test this.


No the visual C++ library are already there by default.

I decided to download the compiler myself (wanted to see how well it works
someday anyway).

I could compile an example and saw a few problems here is one solution.

Compile your asn1 spec with the asn.1 compiler (you of course already did
this).
Create a VC++ project.
Now open windows explorer and go to the skeletons subdir of the asn1
compiler copy all header and c files except the example decoder (forgot the
correct name but it will give an error) and copy them to your VC project
dir.
Now in the solution items tab add all the asn.1 files to your project
There is one more problem in that it will miss htonl:
Go to the properties tab of your dialog
Select linker
Select Input
Add ws2_32.lib in de additional dependecies.

There is still a problem in that they used <headerin stead of "header"
Go to the properties tab
Select C/C++
Select general
Now in additional dependecies add the directory with your VC++ source
files (i.e. this is the default directory that shows up, the one with the
copied asn.1 files).

Build...

You get 2 errors about some unix specific files I believe (maybe not) if so
put those in comment.

Build, and it should work.

Since my compile succeeded; if you see more problems just let me know. (I
didn't check if the example encoder really worked though).



=Thank you


--eberesche--


Regards, Ron AF Greve

http://moonlit.xs4all.nl


  #6  
Old September 24th, 2006, 08:05 PM
eberesche
Guest
 
Posts: n/a
Default Re: Linking ASN.1 - components in C ++ - error LNK2001-


Moonlit schrieb:
Quote:
Hi,
>
>
>
>
>
>
"eberesche" <herbert.schwarz@biddysoft.comwrote in message
news:1158782724.836342.140170@m73g2000cwd.googlegr oups.com...
Moonlit schrieb:
>
Quote:
Hi

I haven't used the asn.1 compiler myself. But looking at the messages you
seem to be missing functions to print the standard asn.1 tags like
integer,
sequence etc.

I could imagine (since I guess these would be the same for any asn.1
program) there is a library around with these functions/variables. Isn't
there a .lib file around. If there is you can add it to additional
dependencies in the 'linker input' tree node of the configuration dialog.


Regards, Ron AF Greve

http://moonlit.xs4all.nl

"eberesche" <herbert.schwarz@biddysoft.comwrote in message
news:1158781152.879447.176000@d34g2000cwd.googlegr oups.com...
Hello, as a novice in ASN.1 I have me to a project in C ++ under use of
ASN.1 - structures risquély. One of my colleagues means, this would
deal something with masochism ;-). Result should be a DLL which
provides the exchange of documents between a DMS and a remote data
base. My developing environment is MSVS v.7.1, and the ASN.1 - source
texts are generated with the compiler asn1c-0.9.20. Therefore I have in
the project cpp-, as well as c - source texts. With the left I receive
the following mistake lines:

------ Build started: Project: testext, Configuration: Debug Win32
------

Linking...
EuroCents.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_asn_DEF_INTEGER
YEARS.obj : error LNK2001: unresolved external symbol _asn_DEF_INTEGER
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_xer@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_encode_der@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_decode_ber@24
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_constraint@16
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_print@20
Success.obj : error LNK2001: unresolved external symbol
_SEQUENCE_free@12
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_xer@24
VarID.obj : error LNK2001: unresolved external symbol
_SEQUENCE_OF_encode_der@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_decode_ber@24
VarID.obj : error LNK2001: unresolved external symbol
_SET_OF_constraint@16
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_print@20
VarID.obj : error LNK2001: unresolved external symbol _SET_OF_free@12
VarID.obj : error LNK2001: unresolved external symbol
_asn_DEF_NumericString
VarID.obj : error LNK2019: unresolved external symbol __asn_i_log_error
referenced in function _memb_NumericString_constraint_1@16
Debug/testext.exe : fatal error LNK1120: 17 unresolved externals

Build log was saved at
"file://c:\Share\dmstest\testext\Debug\BuildLog.htm"
testext - 20 error(s), 0 warning(s)

I have worked through a big number of news and discussions, but have
found no suitable solution. Can somebody give me a few tips which help
me at short notice?

Many thanks beforehand

--eberesche--
>
=This went fast Ron:-)), I had already supposed this. Besides, does it
=concern standard - libraries from the scope of supply of MS
=VisualStudio ? Tomorrow morning I will immediately test this.
>
>
No the visual C++ library are already there by default.
>
I decided to download the compiler myself (wanted to see how well it works
someday anyway).
>
I could compile an example and saw a few problems here is one solution.
>
Compile your asn1 spec with the asn.1 compiler (you of course already did
this).
Create a VC++ project.
Now open windows explorer and go to the skeletons subdir of the asn1
compiler copy all header and c files except the example decoder (forgot the
correct name but it will give an error) and copy them to your VC project
dir.
Now in the solution items tab add all the asn.1 files to your project
There is one more problem in that it will miss htonl:
Go to the properties tab of your dialog
Select linker
Select Input
Add ws2_32.lib in de additional dependecies.
>
There is still a problem in that they used <headerin stead of "header"
Go to the properties tab
Select C/C++
Select general
Now in additional dependecies add the directory with your VC++ source
files (i.e. this is the default directory that shows up, the one with the
copied asn.1 files).
>
Build...
>
You get 2 errors about some unix specific files I believe (maybe not) if so
put those in comment.
>
Build, and it should work.
>
Since my compile succeeded; if you see more problems just let me know. (I
didn't check if the example encoder really worked though).
>
>
>
=Thank you
>
>
--eberesche--
>
>
Regards, Ron AF Greve
>
http://moonlit.xs4all.nl
Hello Moonlit,
the gordic node is released :-)
my mistakes:
- ws2_32.lib was not put down
- /Configuration Properties / C, C ++ / Advanced - Settings confusedly

thank you very much

 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 205,338 network members.