Linking problem

N

noe

Hello,

I have linked a '.c' file and I have obtained next fail:

C:\prueba2\sfilter>build -cZ
BUILD: Object root set to: ==> objchk
BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.
BUILD: /i switch ignored
BUILD: Compile and Link for i386
BUILD: Examining c:\prueba2\sfilter directory for files to compile.
BUILD: Compiling c:\prueba2\sfilter directory
Compiling - sfilter.rc for i386
Compiling - sfilter.c for i386
BUILD: Linking c:\prueba2\sfilter directory
Linking Executable - objchk\i386\sfilter.sys for i386
sfilter.obj() : error LNK2019: unresolved external symbol __imp__malloc
referenc
ed in function _SfFastIoRead@32
objchk\i386\sfilter.sys() : error LNK1120: 1 unresolved externals
BUILD: Done

3 files compiled
1 executable built - 2 Errors



I think that the fail is because of 'malloc' function but I have included
'stdlib.h' file. Does someone know what the problem is?

Greetings from a sunny Madrid.
 
B

Ben Pfaff

noe said:
I have linked a '.c' file and I have obtained next fail:

This is a Microsoft C specific error so you should consult a
Microsoft C newsgroup.
 
S

Shanmuhanathan T

Hello,

I have linked a '.c' file and I have obtained next fail:

C:\prueba2\sfilter>build -cZ
BUILD: Object root set to: ==> objchk
BUILD: Adding /Y to COPYCMD so xcopy ops won't hang.
BUILD: /i switch ignored
BUILD: Compile and Link for i386
BUILD: Examining c:\prueba2\sfilter directory for files to compile.
BUILD: Compiling c:\prueba2\sfilter directory
Compiling - sfilter.rc for i386
Compiling - sfilter.c for i386
BUILD: Linking c:\prueba2\sfilter directory
Linking Executable - objchk\i386\sfilter.sys for i386
sfilter.obj() : error LNK2019: unresolved external symbol __imp__malloc
referenc
ed in function _SfFastIoRead@32
objchk\i386\sfilter.sys() : error LNK1120: 1 unresolved externals
BUILD: Done

3 files compiled
1 executable built - 2 Errors



I think that the fail is because of 'malloc' function but I have included
'stdlib.h' file. Does someone know what the problem is?

Greetings from a sunny Madrid.

Please verify if the .lib/.obj file containing the symbol __imp__malloc
is getting linked with the executable. Include just includes the header
file in the source code for the function protypes etc.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,145
Messages
2,570,824
Members
47,370
Latest member
desertedtyro29

Latest Threads

Top