Recent

Author Topic: compile with -vd for more details.  (Read 6438 times)

apofis

  • New member
  • *
  • Posts: 8
compile with -vd for more details.
« on: June 06, 2016, 08:28:10 pm »
Hi everyone!

I'll try to explain 'cause in english is more difficult for me, sorry.

I have troubles to compile my program, compilation output said
Quote
Error: Duplicate resource: Type = 1, Name = 1, Lang ID = 0000
and
Quote
Error: Error while compiling resources -> Compile with -vd for more details. Check for duplicates.

I search error type = 1, but i didn't find it, but, I compile with -vd option. Where could i  see more information if i compile with -vd for more details.

Thanks a lot friends.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: compile with -vd for more details.
« Reply #1 on: June 06, 2016, 09:51:28 pm »
... but, I compile with -vd option. Where could i  see more information if i compile with -vd for more details.
Guessing you are using lazarus here (using fpc would mean you definitely know where the messages go  ;D )

Compilation related output is all 'listed' inside the message window. See also here.

apofis

  • New member
  • *
  • Posts: 8
Re: compile with -vd for more details.
« Reply #2 on: June 06, 2016, 10:24:26 pm »
I'm sorry, i should be to give more information.
I use lazarus 1.4.4 in windows 32 bits.
The same program compiled in other times, no errors found, but, today, it said that error :(.
Yes, in message window, i saw the information, but, i don't know about details about duplicates, although i used -vd option.

thanks again.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: compile with -vd for more details.
« Reply #3 on: June 06, 2016, 11:34:22 pm »
Yes, in message window, i saw the information, but, i don't know about details about duplicates, although i used -vd option.
If wanted: In your project options, compiler options, verbosity page: turn off all check-boxes _except_ "show debug info (-vd)" which should be left checked, save your project in order to store the new settings and attempt to recompile your project again.

Once compilation stopped, copy and paste all the messages you see inside the message window here on the forum (right click inside the message window to be able to select between available copy options).

The compiler should be able to tell through those messages which resource exactly is causing the problems. Right now it is not possible to even tell if the error you showed is due to a resource issue related to your project or is perhaps caused by one of the default lazarus components (or otherwise).

You perhaps don't know about the details about duplicates but for sure we can't help you if you keep things all bottled up inside ;-)

apofis

  • New member
  • *
  • Posts: 8
Re: compile with -vd for more details.
« Reply #4 on: June 07, 2016, 01:23:41 am »
Thanks for answer :).

You're right.
Quote
Compilar proyecto, Objetivo: gescheques.exe: Código de salida 1, Errores: 2
Error: Duplicate resource: Type = 1, Name = 1, Lang ID = 0000
gescheques.lpr(45,1) Error: Error while compiling resources -> Compile with -vd for more details. Check for duplicates.

Those messages i got.

and window verbosity




molly

  • Hero Member
  • *****
  • Posts: 2330
Re: compile with -vd for more details.
« Reply #5 on: June 07, 2016, 02:48:49 pm »
Maybe someone proficient around is able to translate this part:
"Once compilation stopped, copy and paste all the messages you see inside the message window here on the forum"
into understandable Spanish.

Right now we are getting nowhere. except that we now know the error is causes by a resource that is part of the project itself but which one exactly is still unknown.

The -vd option should generated a whole bunch of messages and not only one single line that only displays the error but right above that also which resource it is attempting to compile and which resource compiler is being invoked to accomplish the task (amongst others).

edit:
This partial snippet is what a simple test project shows for me with option -vd enabled:
Code: [Select]
... snip ...
Debug: Handling option "project1.lpr"
Debug: found source file name "project1.lpr"
Verbose: Free Pascal Compiler version 2.6.4 [2015/07/11] for i386
Verbose: Copyright (c) 1993-2014 by Florian Klaempfl and others
Debug: Compiler OS: Win32 for i386
Verbose: Target OS: Win32 for i386
Verbose: Compiling resource X:\molly\testproject\lib\i386-win32\project1.or
Debug: Calling resource compiler "D:\WinDev\lazarus\fpc\2.6.4\bin\i386-win32\fpcres.exe" with "-o X:\molly\testproject\lib\i386-win32\project1.or -a i386 -of coff -v "@X:\molly\testproject\lib\i386-win32\project1.reslst"" as command line
Debug: parsing command line parameters
Debug: parsing parameter '-o'
Debug: parsing parameter '-a'
Debug: parsing parameter '-of'
Debug: parsing parameter '-v'
Debug: parsing parameter '@X:\molly\testproject\lib\i386-win32\project1.reslst'
Debug: parsing parameter 'D:\WinDev\lazarus\lcl\units\i386-win32\cursors.res'
Debug: parsing parameter 'D:\WinDev\lazarus\lcl\units\i386-win32\btn_icons.res'
Debug: parsing parameter 'D:\WinDev\lazarus\lcl\units\i386-win32\dialog_icons.res'
Debug: parsing parameter 'D:\WinDev\lazarus\lcl\units\i386-win32\lcl_calc_images.res'
Debug: parsing parameter 'D:\WinDev\lazarus\lcl\units\i386-win32\lcl_grid_images.res'
Debug: parsing parameter 'D:\WinDev\lazarus\lcl\units\i386-win32\lcl_dbgrid_images.res'
Debug: parsing parameter 'D:\WinDev\lazarus\lcl\units\i386-win32\win32\win32wsextdlgs.res'
Debug: parsing parameter 'X:\molly\testproject\lib\i386-win32\unit1.lfm'
Debug: parsing parameter 'project1.res'
Debug: target set to i386 - coff
Debug: finished parsing command line parameters
Debug: Trying to open file D:\WinDev\lazarus\lcl\units\i386-win32\cursors.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file D:\WinDev\lazarus\lcl\units\i386-win32\btn_icons.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file D:\WinDev\lazarus\lcl\units\i386-win32\dialog_icons.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file D:\WinDev\lazarus\lcl\units\i386-win32\lcl_calc_images.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file D:\WinDev\lazarus\lcl\units\i386-win32\lcl_grid_images.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file D:\WinDev\lazarus\lcl\units\i386-win32\lcl_dbgrid_images.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file D:\WinDev\lazarus\lcl\units\i386-win32\win32\win32wsextdlgs.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file X:\molly\testproject\lib\i386-win32\unit1.lfm...
Debug: Chosen reader: DFM resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: Trying to open file project1.res...
Debug: Chosen reader: .res resource reader
Debug: Reading resource information...
Debug: Resource information read
Debug: 60 resources read.
Debug: Trying to create output file X:\molly\testproject\lib\i386-win32\project1.or...
Debug: Setting up resource writer...
Debug: Writing output file X:\molly\testproject\lib\i386-win32\project1.or...
Debug: Output file X:\molly\testproject\lib\i386-win32\project1.or written
Debug: Time elapsed: 0.4 seconds
Debug: Cleaning up
Verbose: Linking project1.exe
Verbose: 21 lines compiled, 5.5 sec , 1316016 bytes code, 328172 bytes data
« Last Edit: June 07, 2016, 03:05:33 pm by molly »

apofis

  • New member
  • *
  • Posts: 8
Re: compile with -vd for more details.
« Reply #6 on: June 07, 2016, 06:35:28 pm »
sorry, you're right.

Although i understand that i must show the message window, but i only got those three lines.
I'll try change options in options proyect, perhaps i can get something like your message window.

thanks a lot for try to understand.

molly

  • Hero Member
  • *****
  • Posts: 2330
Re: compile with -vd for more details.
« Reply #7 on: June 07, 2016, 09:19:59 pm »
Although i understand that i must show the message window, but i only got those three lines.
Sorry, my bad  :-[

I thought perhaps you misunderstood the English words i used.

That is strange that you do not get to see more information inside the message window. I am aware that it is possible to filter those messages but usually pressing the right mousebutton to let it pop up the quick menu, then selecting copy -> copy all/original messages should be able to copy all the messages, e.g. also those that are currently not visible.

Please also note that the message window showing these debug messages while the -vd option in the project is activated are shown by default for me -> I did not change any other setting inside Lazarus or the project in order to be able to show these messages.

As an alternative approach and in case possible:
Open your project, then select from the menu project -> publish project.A new window will popup that let's you select a custom directory to publish the files belonging to your project. Once a directory is set, press ok to 'publish' your project into that directory.

When done: zip that directory (or all files in it) and attach the resulting zip-archive to the forums. Of course if you are more familiar with rar, 7zip, lha, rar, gzip or otherwise then please feel free to use that instead of zip.

 

TinyPortal © 2005-2018