Build Error - FWH, Harbour, MSVC

Build Error - FWH, Harbour, MSVC

Postby TimStone » Fri Jun 01, 2012 8:44 pm

Everything was working fine ... then today happened.

I'm building an application within UE Studio, using FWH, Harbour, and MSVC 2010. It has been building fine. Then today I started getting the following error:

LINK : fatal error LNK1123: failure during conversion to COFF: file invalid or corrupt

If I don't link in the .res file, I dont get the error. However, this same .res file has been fine previously and is built with the Microsoft rc compiler.

Has anyone seen this message before ? I looked at the Microsoft info online but it doesn't exactly help to find the right file that is causing the problem.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Build Error - FWH, Harbour, MSVC

Postby nnicanor » Sat Jun 02, 2012 1:11 am

Tim,

Are you installed MSVC or use a copy from another install ??

use resource compiler from VC2008, VC2010 not comming with resource compiler.

Regards,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Build Error - FWH, Harbour, MSVC

Postby Antonio Linares » Sat Jun 02, 2012 11:59 am

Tim,

Whats the exact command line that you use to call the linker ?

You have to pay attention to the "," used
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Build Error - FWH, Harbour, MSVC

Postby nnicanor » Sat Jun 02, 2012 1:56 pm

Do you have duplicate resources names in multiple resource file linking ?

Regards,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Build Error - FWH, Harbour, MSVC

Postby nnicanor » Sat Jun 02, 2012 2:55 pm

Tim,

this is my link commad and link script to build fine my exe using multiple res file with MSVC2010

LINK @mvc.tmp /subsystem:windows /nologo /FORCE:MULTIPLE /ignore:4006 /NODEFAULTLIB:libc /OUT:"C:\ProyectosFW\Sql_Control\Bin\ControlesHm.EXE"


"C:\fuentes\fwhx\sqlcontrol\obj\controles.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\GestionReportes.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\MySQL_utils.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\testxbr3.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\dic.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\empresas.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\procesos.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\setbrw.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\testfile2.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\usuarios.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\rpreview1109.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\UpdFtp2.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\xbrowse1105.obj"
"C:\fuentes\fwhx\sqlcontrol\obj\femail.obj"
libmysqlm.lib
dolphinhm.lib
recur32hmvc.lib
FiveH32.lib FiveHC32.lib
xhb.lib
hbrtl.lib
hbvm.lib
gtgui.lib
hblang.lib
hbmacro.lib
hbrdd.lib
hbcpage.lib
rddntx.lib
rddcdx.lib
rddfpt.lib
hbsix.lib
hbcommon.lib
hbpp.lib
hbct.lib
hbwin.lib
hbcplr.lib
hbpcre.lib
hbmzip.lib
minizip.lib
hbzlib.lib
hbziparc.lib
png.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comctl32.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
mpr.lib
winmm.lib
libcpmt.lib
oldnames.lib
version.lib
wsock32.lib
msimg32.lib
oledlg.lib
psapi.lib
iphlpapi.lib
"C:\fuentes\Librerias\recurlib\Resource\ICONOS.Res"
"C:\fuentes\Librerias\recurlib\Resource\recursos.RES"
"C:\fuentes\Librerias\recurlib\Resource\testxbr3.RES"
"C:\fuentes\fwhx\sqlcontrol\controles.res"
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Build Error - FWH, Harbour, MSVC

Postby TimStone » Sat Jun 02, 2012 9:10 pm

RC.exe is actually provided in the Microsoft SDKs and we've used that previously.

I will look at the configuration on my older computer to see if maybe there is something different.
I did use the same configuration ( and link script ) to build Antonio's DBU and that worked fine. However, it did not use a resource file. Thus I suspect for some reason this resource file build is flawed, although I don't seem to have an issue with it being built. I'll look further into it shortly.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Build Error - FWH, Harbour, MSVC

Postby TimStone » Sat Jun 02, 2012 10:21 pm

Nicanor,

Do you have a make file you could send me ....

I am using UE Studio and their Build from the project files. It was working fine on my other computer, but not on the new one. Both are WIn 7 machines, but I loaded all of the software fresh on this new one. In some cases that may be a huge advantage because some of the "issues" have gone away.

Perhaps an external build file will work better. I'm using Harbour 3.0, FWH 12.04 and Microsoft Visual Studio 2010 with the SDK kit 7.0

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Build Error - FWH, Harbour, MSVC

Postby nnicanor » Sun Jun 03, 2012 1:39 am

this is a makefile sample makefile.mak to build i'm using make from borland.

go.bat

@echo off
c:\devel\c\bcc63\bin\make -fmakefile.mak
del bin\*.lib
del bin\*.exp



and makefile.mak

Code: Select all  Expand view


#Microsoft make sample, (c) FiveTech Software 2005

HBDIR=c:\devel\hb\hb31
VCDIR=c:\devel\c\vc2010
FWDIR=c:\devel\fwh

.SUFFIXES: .prg .c .obj .rc .res

controles8.exe : .\resource2\controles.res .\obj\controles.obj .\obj\wbrwlineh_vc.obj .\obj\updftp2.obj .\obj\xbrowse1105.c .\obj\wbrowseh.obj .\obj\dic.obj .\obj\dsay.obj .\obj\empresas.obj .\obj\errsysw.obj .\obj\fastreph.obj .\obj\femail.obj .\obj\fwcal.obj .\obj\gestionreportes.obj .\obj\mysql_utils.obj .\obj\procesos.obj .\obj\quickwin.obj .\obj\rddarray.obj .\obj\recursosn.obj .\obj\sayref.obj .\obj\setbrw.obj .\obj\tcb1007.obj .\obj\tcbrowse.obj .\obj\testfile2.obj .\obj\testxbr3.obj .\obj\tfilexls.obj .\obj\tmultiuse.obj .\obj\tsysinfo.obj .\obj\usuarios.obj .\obj\xlserror.obj .\obj\xlsfunc.obj .\resource2\controles.res
   echo .\obj\controles.obj .\obj\wbrwlineh_vc.obj .\obj\wbrowseh.obj .\obj\updftp2.obj .\obj\dic.obj .\obj\dsay.obj .\obj\empresas.obj .\obj\errsysw.obj .\obj\fastreph.obj .\obj\femail.obj .\obj\fwcal.obj .\obj\gestionreportes.obj .\obj\mysql_utils.obj .\obj\procesos.obj .\obj\quickwin.obj .\obj\rddarray.obj .\obj\recursosn.obj .\obj\sayref.obj .\obj\setbrw.obj .\obj\tcb1007.obj .\obj\tcbrowse.obj .\obj\testfile2.obj .\obj\testxbr3.obj .\obj\tfilexls.obj .\obj\tmultiuse.obj .\obj\tsysinfo.obj .\obj\usuarios.obj .\obj\xlserror.obj .\obj\xlsfunc.obj > msvc.tmp
   echo $(FWDIR)\lib\FiveH32.lib $(FWDIR)\lib\FiveHC32.lib >> msvc.tmp
   echo $(HBDIR)\lib\mvc\dolphinhm.lib >> msvc.tmp
   echo $(HBDIR)\lib\mvc\libmysqlm.lib >> msvc.tmp
   echo $(HBDIR)\lib\mvc\xhb.lib      >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbrtl.lib      >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbvm.lib       >> msvc.tmp
   echo $(HBDIR)\lib\mvc\gtgui.lib    >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hblang.lib     >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbmacro.lib    >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbrdd.lib      >> msvc.tmp
   echo $(HBDIR)\lib\mvc\rddntx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\mvc\rddcdx.lib   >> msvc.tmp
   echo $(HBDIR)\lib\mvc\rddfpt.lib   >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbsix.lib    >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbct.lib    >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbdebug.lib    >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbcommon.lib   >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbpp.lib       >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbcpage.lib >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbwin.lib    >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbcplr.lib    >> msvc.tmp
   echo $(HBDIR)\lib\mvc\hbpcre.lib    >> msvc.tmp
   echo $(VCDIR)\lib\kernel32.lib  >> msvc.tmp
   echo $(VCDIR)\lib\user32.lib    >> msvc.tmp
   echo $(VCDIR)\lib\gdi32.lib     >> msvc.tmp
   echo $(VCDIR)\lib\winspool.lib  >> msvc.tmp
   echo $(VCDIR)\lib\comctl32.lib  >> msvc.tmp
   echo $(VCDIR)\lib\comdlg32.lib  >> msvc.tmp
   echo $(VCDIR)\lib\advapi32.lib  >> msvc.tmp
   echo $(VCDIR)\lib\shell32.lib   >> msvc.tmp
   echo $(VCDIR)\lib\ole32.lib     >> msvc.tmp
   echo $(VCDIR)\lib\oleaut32.lib  >> msvc.tmp
   echo $(VCDIR)\lib\uuid.lib      >> msvc.tmp
   echo $(VCDIR)\lib\odbc32.lib    >> msvc.tmp
   echo $(VCDIR)\lib\odbccp32.lib  >> msvc.tmp
   echo $(VCDIR)\lib\iphlpapi.lib  >> msvc.tmp
   echo $(VCDIR)\lib\mpr.lib       >> msvc.tmp
   echo $(VCDIR)\lib\psapi.lib       >> msvc.tmp
   echo $(VCDIR)\lib\WinMM.Lib     >> msvc.tmp
   echo $(VCDIR)\lib\libcpmt.Lib     >> msvc.tmp
   echo $(VCDIR)\lib\libcmt.Lib     >> msvc.tmp
   echo $(VCDIR)\lib\OLDNAMES.Lib     >> msvc.tmp
   echo $(VCDIR)\lib\version.lib   >> msvc.tmp
   echo $(VCDIR)\lib\wsock32.lib   >> msvc.tmp
   echo $(VCDIR)\lib\msimg32.lib   >> msvc.tmp
   echo $(VCDIR)\lib\oledlg.lib   >> msvc.tmp

   IF EXIST .\resource2\controles.res echo .\resource2\controles.res >> msvc.tmp

   SET LIB=$(VCDIR)\lib
   $(VCDIR)\bin\link @msvc.tmp /nologo /subsystem:windows /force:multiple /ignore:4006 /NODEFAULTLIB:libc /OUT:bin\controlesHm1.exe > link.log

   @type link.log
#   @del test.c
#   @del one.c
   @copy msvc.tmp msvc.log
   @del msvc.tmp
#   @copy controles.exe .\bin\controles0.exe
#   @del controles.exe


.\obj\controles.c         : .\source\prg\controles.prg
.\obj\dic.c               : .\source\prg\dic.prg
.\obj\dsay.c              : .\source\prg\dsay.prg
.\obj\empresas.c          : .\source\prg\empresas.prg
.\obj\errsysw.c           : .\source\prg\errsysw.prg
.\obj\fastreph.c          : .\source\prg\fastreph.prg
.\obj\femail.c            : .\source\prg\femail.prg
.\obj\fwcal.c             : .\source\prg\fwcal.prg
.\obj\gestionreportes.c   : .\source\prg\gestionreportes.prg
.\obj\mysql_utils.c       : .\source\prg\mysql_utils.prg
.\obj\procesos.c          : .\source\prg\procesos.prg
.\obj\quickwin.c          : .\source\prg\quickwin.prg
.\obj\rddarray.c          : .\source\prg\rddarray.prg
.\obj\recursosn.c         : .\source\prg\recursosn.prg
.\obj\sayref.c            : .\source\prg\sayref.prg
.\obj\setbrw.c            : .\source\prg\setbrw.prg
.\obj\tcb1007.c           : .\source\prg\tcb1007.prg
.\obj\tcbrowse.c          : .\source\prg\tcbrowse.prg
.\obj\testfile2.c         : .\source\prg\testfile2.prg
.\obj\testxbr3.c          : .\source\prg\testxbr3.prg
.\obj\tfilexls.c          : .\source\prg\tfilexls.prg
.\obj\tmultiuse.c         : .\source\prg\tmultiuse.prg
.\obj\tsysinfo.c          : .\source\prg\tsysinfo.prg
.\obj\usuarios.c          : .\source\prg\usuarios.prg
.\obj\xlserror.c          : .\source\prg\xlserror.prg
.\obj\xlsfunc.c           : .\source\prg\xlsfunc.prg
.\obj\xbrowse1105.c       : .\source\prg\xbrowse1105.prg
.\obj\wbrowseh.c          : .\source\prg\wbrowseh.prg
.\obj\wbrwlineh_vc.obj    : .\source\c\wbrwlineh_vc.c
.\obj\updftp2.obj         : .\source\prg\updftp2.c
.\resource2\controles.res : .\resource2\controles.rc

.c.obj :
 $(VCDIR)\bin\cl -c -W3 -GA -D__FLAT__ -D_CRT_SECURE_NO_WARNINGS -D__MVC__ -D__HARBOUR__ -I$(HBDIR)\include -I$(VCDIR)\include -I$(VCDIR)\sdk\include -Fo$@ $<
# $(VCDIR)\bin\cl -c -TP -W3 -GA -D__FLAT__ -D_CRT_SECURE_NO_WARNINGS -D__HARBOUR__ -I$(HBDIR)\include -I$(VCDIR)\include -I$(VCDIR)\sdk\include -Fo$@ $<

.prg.c :
   $(HBDIR)\bin\mvc\harbour -o$@ -d__MVC__ $< /n /i$(FWDIR)\include;$(HBDIR)\include;c:\fuentes\librerias\recurlib\include;c:\tdolphing\include

#.c.obj :
#   $(VCDIR)\bin\cl -c -TP -W3 -GA -D_CRT_SECURE_NO_WARNINGS -I$(VCDIR)\include -I$(VCDIR)\sdk\include -I$(HBDIR)\include -Fo$@ $<

.rc.res:
   $(VCDIR)\bin\rc -r -d__FLAT__ -I$(VCDIR)\include -I$(VCDIR)\sdk\include -Fo$@ $<



 
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia

Re: Build Error - FWH, Harbour, MSVC

Postby Antonio Linares » Sun Jun 03, 2012 12:20 pm

Tim,

The RC file may contain the description of some BITMAPS (or similar resources) that are not found on your PC and that will avoid its creation and the make will stop.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42081
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Build Error - FWH, Harbour, MSVC

Postby TimStone » Sun Jun 03, 2012 11:39 pm

This problem was on the new computer, and not the old. So I went to Windows Update, and that downloaded a SR and a number of patches for Visual Studio 2010. Now it is building.

Thanks for all the input. It is a real frustration when having to completely load a brand new computer.

Tim
Tim Stone
http://www.MasterLinkSoftware.com
http://www.autoshopwriter.com
timstone@masterlinksoftware.com
Using: FWH 23.10 with Harbour 3.2.0 / Microsoft Visual Studio Community 2022-24 32/64 bit
User avatar
TimStone
 
Posts: 2944
Joined: Fri Oct 07, 2005 1:45 pm
Location: Trabuco Canyon, CA USA

Re: Build Error - FWH, Harbour, MSVC

Postby nnicanor » Mon Jun 04, 2012 1:13 pm

Tim,

Same problem for me when i configured a backup computer, VC and Mingw must be installed and configured properly to build fine.


Regards,
Nicanor Martinez M.
Auditoria y Sistemas Ltda.
MicroExpress Ltda.
FW + FWH + XHARBOUR + HARBOUR + PELLES C + XDEVSTUDIO + XEDIT + BCC + VC_X86 + VCC_X64 + MINGW + R&R Reports + FastReport + Tdolphin + ADO + MYSQL + MARIADB + ORACLE
nnicanor@yahoo.com
nnicanor
 
Posts: 302
Joined: Fri Apr 23, 2010 4:30 am
Location: Colombia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 57 guests