By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,987 Members | 997 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,987 IT Pros & Developers. It's quick & easy.

Linking ASN.1 - components in C ++ - error LNK2001-

P: n/a
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--

Sep 20 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
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" <he*************@biddysoft.comwrote in message
news:11**********************@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--
Sep 20 '06 #2

P: n/a
Moonlit schrieb:
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" <he*************@biddysoft.comwrote in message
news:11**********************@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--

Sep 20 '06 #3

P: n/a
Moonlit wrote:
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>
Sep 20 '06 #4

P: n/a
Hi,


"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Moonlit schrieb:
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" <he*************@biddysoft.comwrote in message
news:11**********************@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
Sep 21 '06 #5

P: n/a

Moonlit schrieb:
Hi,


"eberesche" <he*************@biddysoft.comwrote in message
news:11**********************@m73g2000cwd.googlegr oups.com...
Moonlit schrieb:
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" <he*************@biddysoft.comwrote in message
news:11**********************@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

Sep 24 '06 #6

This discussion thread is closed

Replies have been disabled for this discussion.