Author Topic: Compiling NASM with MSVS 9  (Read 18247 times)

nobody

  • Guest
Compiling NASM with MSVS 9
« on: June 10, 2009, 12:51:19 PM »
Hi,

I've been trying to compile NASM successfully with MSVS 9, without using the makefile ( which works perfectly ). I don't want to use the makefile because I'm trying to incorporate parts of NASM into my own project, and for that reason I don't think the makefile would work. I've got all the correct files included in a new VC project and there are no complaints about missing files. ( Note: I didn't change anything in the NASM files just yet ) However, a lot of linking errors appear which usually means I'm missing a library file or something of the likes. I've searched the source files but I couldn't find any library files hidden in there. There are also various warnings that I don't recognize, plus MSVS seems to like the parser.h file in the windows sdk better than the parser.h that comes with NASM ( so watch out for that one because that will cause errors ).

So my question is: How do I succesfully create a new project that enables me to compile disasm ( or NASM ) using MSVS 9.

The warning that seems troublesome and keeps popping up:

1>nasm.c
1>c:\users\admin\documents\visual studio 2008\projects\rta2\rta2\compiler.h(76) : warning C4273: 'vsnprintf' : inconsistent dll linkage
1>        c:\program files (x86)\microsoft visual studio 9.0\vc\include\stdio.h(350) : see previous definition of 'vsnprintf'

The linking errors:

1>Linking...
1>disasm.obj : error LNK2019: unresolved external symbol _snprintf referenced in function _disasm
1>nasm.obj : error LNK2001: unresolved external symbol _snprintf
1>preproc.obj : error LNK2001: unresolved external symbol _snprintf
1>nasm.obj : error LNK2019: unresolved external symbol _eval_cleanup referenced in function _main
1>nasm.obj : error LNK2019: unresolved external symbol _cleanup_labels referenced in function _main
1>nasm.obj : error LNK2019: unresolved external symbol _define_label referenced in function _main
1>nasm.obj : error LNK2019: unresolved external symbol _init_labels referenced in function _main
1>nasm.obj : error LNK2019: unresolved external symbol _evaluate referenced in function _main
1>nasm.obj : error LNK2001: unresolved external symbol _nasmlist
1>nasm.obj : error LNK2019: unresolved external symbol _eval_global_info referenced in function _main
1>nasm.obj : error LNK2019: unresolved external symbol _lookup_label referenced in function _main
1>nasm.obj : error LNK2019: unresolved external symbol _parser_global_info referenced in function _main
1>nasm.obj : error LNK2001: unresolved external symbol _lpostfix
1>nasm.obj : error LNK2001: unresolved external symbol _lprefix
1>nasm.obj : error LNK2001: unresolved external symbol _nasm_version
1>nasm.obj : error LNK2001: unresolved external symbol _nasm_date
1>nasm.obj : error LNK2001: unresolved external symbol _nasm_compile_options
1>nasm.obj : error LNK2019: unresolved external symbol _dfmt_list referenced in function _process_arg
1>nasm.obj : error LNK2019: unresolved external symbol _ofmt_list referenced in function _process_arg
1>nasm.obj : error LNK2019: unresolved external symbol _dfmt_find referenced in function _process_arg
1>nasm.obj : error LNK2019: unresolved external symbol _ofmt_find referenced in function _process_arg
1>nasm.obj : error LNK2019: unresolved external symbol _cleanup_insn referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _assemble referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _insn_size referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _parse_line referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _float_option referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _reloc_value referenced in function _assemble_file
1>preproc.obj : error LNK2001: unresolved external symbol _reloc_value
1>nasm.obj : error LNK2019: unresolved external symbol _reloc_seg referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _is_reloc referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _define_common referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _declare_as_global referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _is_extern referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _redefine_label referenced in function _assemble_file
1>nasm.obj : error LNK2019: unresolved external symbol _ofmt_register referenced in function _register_output_formats
1>preproc.obj : error LNK2001: unresolved external symbol _nasm_stdmac_after_tasm
1>preproc.obj : error LNK2001: unresolved external symbol _nasm_stdmac
1>preproc.obj : error LNK2019: unresolved external symbol _is_simple referenced in function _do_directive
1>preproc.obj : error LNK2019: unresolved external symbol _nasm_stdmac_find_package referenced in function _do_directive
1>preproc.obj : error LNK2019: unresolved external symbol _nasm_token_hash referenced in function _ppscan
1>stdscan.obj : error LNK2001: unresolved external symbol _nasm_token_hash
1>pptok.obj : error LNK2019: unresolved external symbol _crc64i referenced in function _pp_token_hash
1>hashtbl.obj : error LNK2001: unresolved external symbol _crc64i
1>hashtbl.obj : error LNK2019: unresolved external symbol _crc64 referenced in function _hash_find