I am linking with third-party DLL and get
The procedure entry point jtagatlantic_write could not be located in the dynamic link library C:MyCodeTestsCppConsoleTestx64DebugConsoleTest.exe.
when application begins to load. I verified the linker command includes jtag_atlantic.lib and from dumpbin it looks like the reported symbol is present.
The lib file was generated from the following jtag_atlantic.def
EXPORTS
jtagatlantic_bytes_available
jtagatlantic_cable_warning
jtagatlantic_close
jtagatlantic_flush
jtagatlantic_get_error
jtagatlantic_get_info
jtagatlantic_is_setup_done
jtagatlantic_open
jtagatlantic_open
jtagatlantic_read
jtagatlantic_scan_thread
jtagatlantic_wait_open
jtagatlantic_write
by
lib /def:jtag_atlantic.def /machine:x64 /out:jtag_atlantic.lib
What else should I check?
Dump of file jtag_atlantic.dll
File Type: DLL
Section contains the following exports for jtag_atlantic.dll
00000000 characteristics
5B999615 time date stamp Thu Sep 13 01:41:25 2018
0.00 version
1 ordinal base
19 number of functions
19 number of names
ordinal hint RVA name
1 0 00001420 ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1close@@YAXPEAUJNIEnv_@@PEAV_jobject@@J@Z = ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1close@@YAXPEAUJNIEnv_@@PEAV_jobject@@J@Z (void __cdecl Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1close(struct JNIEnv_ *,class _jobject *,long))
2 1 00001450 ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1flush@@YAJPEAUJNIEnv_@@PEAV_jobject@@J@Z = ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1flush@@YAJPEAUJNIEnv_@@PEAV_jobject@@J@Z (long __cdecl Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1flush(struct JNIEnv_ *,class _jobject *,long))
3 2 000014B0 ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1get_1last_1open_1error@@YAPEAV_jstring@@PEAUJNIEnv_@@PEAV_jobject@@@Z = ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1get_1last_1open_1error@@YAPEAV_jstring@@PEAUJNIEnv_@@PEAV_jobject@@@Z (class _jstring * __cdecl Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1get_1last_1open_1error(struct JNIEnv_ *,class _jobject *))
4 3 000014C0 ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1open@@YAJPEAUJNIEnv_@@PEAV_jobject@@PEAV_jstring@@JJ@Z = ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1open@@YAJPEAUJNIEnv_@@PEAV_jobject@@PEAV_jstring@@JJ@Z (long __cdecl Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1open(struct JNIEnv_ *,class _jobject *,class _jstring *,long,long))
5 4 00001540 ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1read@@YAJPEAUJNIEnv_@@PEAV_jobject@@JPEAV_jbyteArray@@@Z = ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1read@@YAJPEAUJNIEnv_@@PEAV_jobject@@JPEAV_jbyteArray@@@Z (long __cdecl Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1read(struct JNIEnv_ *,class _jobject *,long,class _jbyteArray *))
6 5 000015D0 ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1write@@YAJPEAUJNIEnv_@@PEAV_jobject@@JPEAV_jbyteArray@@@Z = ?Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1write@@YAJPEAUJNIEnv_@@PEAV_jobject@@JPEAV_jbyteArray@@@Z (long __cdecl Java_com_altera_jnijtagatlantic_JtagAtlanticConnection_n_1write(struct JNIEnv_ *,class _jobject *,long,class _jbyteArray *))
7 6 00001C90 ?jtagatlantic_bytes_available@@YAHPEAUJTAGATLANTIC@@@Z = ?jtagatlantic_bytes_available@@YAHPEAUJTAGATLANTIC@@@Z (int __cdecl jtagatlantic_bytes_available(struct JTAGATLANTIC *))
8 7 00001CB0 ?jtagatlantic_cable_warning@@YAHPEAUJTAGATLANTIC@@@Z = ?jtagatlantic_cable_warning@@YAHPEAUJTAGATLANTIC@@@Z (int __cdecl jtagatlantic_cable_warning(struct JTAGATLANTIC *))
9 8 00001CC0 ?jtagatlantic_close@@YAXPEAUJTAGATLANTIC@@@Z = ?jtagatlantic_close@@YAXPEAUJTAGATLANTIC@@@Z (void __cdecl jtagatlantic_close(struct JTAGATLANTIC *))
10 9 00001CE0 ?jtagatlantic_flush@@YAHPEAUJTAGATLANTIC@@@Z = ?jtagatlantic_flush@@YAHPEAUJTAGATLANTIC@@@Z (int __cdecl jtagatlantic_flush(struct JTAGATLANTIC *))
11 A 00001D40 ?jtagatlantic_get_error@@YA?AW4JATL_ERROR@@PEAPEBD@Z = ?jtagatlantic_get_error@@YA?AW4JATL_ERROR@@PEAPEBD@Z (enum JATL_ERROR __cdecl jtagatlantic_get_error(char const * *))
12 B 00001D60 ?jtagatlantic_get_info@@YAXPEAUJTAGATLANTIC@@PEAPEBDPEAH2@Z = ?jtagatlantic_get_info@@YAXPEAUJTAGATLANTIC@@PEAPEBDPEAH2@Z (void __cdecl jtagatlantic_get_info(struct JTAGATLANTIC *,char const * *,int *,int *))
13 C 00001D90 ?jtagatlantic_is_setup_done@@YA_NPEAUJTAGATLANTIC@@@Z = ?jtagatlantic_is_setup_done@@YA_NPEAUJTAGATLANTIC@@@Z (bool __cdecl jtagatlantic_is_setup_done(struct JTAGATLANTIC *))
14 D 00001DA0 ?jtagatlantic_open@@YAPEAUJTAGATLANTIC@@PEBDHH0@Z = ?jtagatlantic_open@@YAPEAUJTAGATLANTIC@@PEBDHH0@Z (struct JTAGATLANTIC * __cdecl jtagatlantic_open(char const *,int,int,char const *))
15 E 00001DC0 ?jtagatlantic_open@@YAPEAUJTAGATLANTIC@@PEBDHH0PEAVLOCK_HANDLER@@@Z = ?jtagatlantic_open@@YAPEAUJTAGATLANTIC@@PEBDHH0PEAVLOCK_HANDLER@@@Z (struct JTAGATLANTIC * __cdecl jtagatlantic_open(char const *,int,int,char const *,class LOCK_HANDLER *))
16 F 00002150 ?jtagatlantic_read@@YAHPEAUJTAGATLANTIC@@PEADI@Z = ?jtagatlantic_read@@YAHPEAUJTAGATLANTIC@@PEADI@Z (int __cdecl jtagatlantic_read(struct JTAGATLANTIC *,char *,unsigned int))
17 10 00002160 ?jtagatlantic_scan_thread@@YAXPEAUJTAGATLANTIC@@@Z = ?jtagatlantic_scan_thread@@YAXPEAUJTAGATLANTIC@@@Z (void __cdecl jtagatlantic_scan_thread(struct JTAGATLANTIC *))
18 11 00002170 ?jtagatlantic_wait_open@@YAHPEAUJTAGATLANTIC@@@Z = ?jtagatlantic_wait_open@@YAHPEAUJTAGATLANTIC@@@Z (int __cdecl jtagatlantic_wait_open(struct JTAGATLANTIC *))
19 12 000021B0 ?jtagatlantic_write@@YAHPEAUJTAGATLANTIC@@PEBDI@Z = ?jtagatlantic_write@@YAHPEAUJTAGATLANTIC@@PEBDI@Z (int __cdecl jtagatlantic_write(struct JTAGATLANTIC *,char const *,unsigned int))
Summary
1000 .data
1000 .pdata
2000 .rdata
1000 .reloc
3000 .text
Dump of file jtag_atlantic.dll
PE signature found
File Type: DLL
FILE HEADER VALUES
8664 machine (x64)
5 number of sections
5B999BA2 time date stamp Thu Sep 13 02:05:06 2018
0 file pointer to symbol table
0 number of symbols
F0 size of optional header
2022 characteristics
Executable
Application can handle large (>2GB) addresses
DLL
OPTIONAL HEADER VALUES
20B magic # (PE32+)
12.00 linker version
2C00 size of code
2200 size of initialized data
0 size of uninitialized data
3460 entry point (0000000180003460) _DllMainCRTStartup
1000 base of code
180000000 image base (0000000180000000 to 0000000180008FFF)
1000 section alignment
200 file alignment
6.00 operating system version
0.00 image version
6.00 subsystem version
0 Win32 version
9000 size of image
400 size of headers
0 checksum
3 subsystem (Windows CUI)
160 DLL characteristics
High Entropy Virtual Addresses
Dynamic base
NX compatible
100000 size of stack reserve
1000 size of stack commit
100000 size of heap reserve
1000 size of heap commit
0 loader flags
10 number of directories
4900 [ 646] RVA [size] of Export Directory
4F48 [ 50] RVA [size] of Import Directory
0 [ 0] RVA [size] of Resource Directory
7000 [ 2F4] RVA [size] of Exception Directory
0 [ 0] RVA [size] of Certificates Directory
8000 [ 2C] RVA [size] of Base Relocation Directory
4210 [ 38] RVA [size] of Debug Directory
0 [ 0] RVA [size] of Architecture Directory
0 [ 0] RVA [size] of Global Pointer Directory
0 [ 0] RVA [size] of Thread Storage Directory
4350 [ 70] RVA [size] of Load Configuration Directory
0 [ 0] RVA [size] of Bound Import Directory
4000 [ 1D8] RVA [size] of Import Address Table Directory
0 [ 0] RVA [size] of Delay Import Directory
0 [ 0] RVA [size] of COM Descriptor Directory
0 [ 0] RVA [size] of Reserved Directory
SECTION HEADER #1
.text name
2AFB virtual size
1000 virtual address (0000000180001000 to 0000000180003AFA)
2C00 size of raw data
400 file pointer to raw data (00000400 to 00002FFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
60000020 flags
Code
Execute Read
SECTION HEADER #2
.rdata name
1884 virtual size
4000 virtual address (0000000180004000 to 0000000180005883)
1A00 size of raw data
3000 file pointer to raw data (00003000 to 000049FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only
Debug Directories
Time Type Size RVA Pointer
-------- ------- -------- -------- --------
5B999BA2 cv 2A 000043C0 33C0 Format: RSDS, {89F3C38C-E494-4FF4-AB3B-90068B504087}, 1, jtag_atlantic.pdb
5B999BA2 feat 14 000043EC 33EC Counts: Pre-VC++ 11.00=0, C/C++=15, /GS=14, /sdl=0, guardN=0
SECTION HEADER #3
.data name
C0 virtual size
6000 virtual address (0000000180006000 to 00000001800060BF)
200 size of raw data
4A00 file pointer to raw data (00004A00 to 00004BFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
C0000040 flags
Initialized Data
Read Write
SECTION HEADER #4
.pdata name
2F4 virtual size
7000 virtual address (0000000180007000 to 00000001800072F3)
400 size of raw data
4C00 file pointer to raw data (00004C00 to 00004FFF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
40000040 flags
Initialized Data
Read Only
SECTION HEADER #5
.reloc name
2C virtual size
8000 virtual address (0000000180008000 to 000000018000802B)
200 size of raw data
5000 file pointer to raw data (00005000 to 000051FF)
0 file pointer to relocation table
0 file pointer to line numbers
0 number of relocations
0 number of line numbers
42000040 flags
Initialized Data
Discardable
Read Only
Summary
1000 .data
1000 .pdata
2000 .rdata
1000 .reloc
3000 .text