Re: [hatari-devel] Build/Link failure

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 11/07/2017 10:41 PM, Eero Tamminen wrote:
On 11/07/2017 09:54 PM, Christer Solskogen wrote:
Take a look please. It came with the latest revision.

http://antarctica.no/~hatari/hatari-6265858dbf86/windows/make-win32-release.6265858dbf86.log


CMakeFiles/hatari.dir/objects.a(floppy_ipf.c.obj):floppy_ipf.c:(.text+0x13f): undefined reference to `IPF_Eject_RawStreamImage'
collect2: error: ld returned 1 exit status

I guess all calls to that function in floppy_ipf.c aren't inside:
     #ifdef HAVE_CAPSIMAGE

Nicolas?

I'm using the attached patch to avoid the compile error & warnings.


	- Eero
diff -r 6265858dbf86 src/floppy_ipf.c
--- a/src/floppy_ipf.c	Mon Nov 06 17:51:47 2017 +0100
+++ b/src/floppy_ipf.c	Wed Nov 08 00:34:12 2017 +0200
@@ -105,7 +105,6 @@
 	int	Drive;
 	int	Track , Side;
 	int	TrackSize;
-	Uint8	*p;
 
 
 	if ( bSave )					/* Saving snapshot */
@@ -180,6 +179,7 @@
 						return;
 					}
 
+#ifdef HAVE_CAPSIMAGE
 			/* Restore the content of IPF_RawStreamImage[] */
 			/* NOTE  : IPF_Insert above might already have read the raw tracks from disk, */
 			/* so we free all those tracks and read them again from the snapshot instead */
@@ -196,7 +196,7 @@
 						IPF_RawStreamImage[ Drive ][ Track ][Side].TrackData = NULL;
 						if ( TrackSize > 0 )
 						{
-							p = malloc ( TrackSize );
+							Uint8 *p = malloc ( TrackSize );
 							if ( p == NULL )
 							{
 								Log_AlertDlg(LOG_ERROR, "Error restoring IPF raw track drive %d track %d side %d size %d" ,
@@ -208,6 +208,7 @@
 						}
 					}
 			}
+#endif
 		fprintf ( stderr , "ipf load ok\n" );
 		}
 	}
@@ -242,6 +243,7 @@
  * a pointer to this string.
  * If not found, we return NULL
  */
+#ifdef HAVE_CAPSIMAGE
 static char *IPF_FilenameFindTrackSide (char *FileName)
 {
 	char	ext[] = ".raw";
@@ -266,6 +268,7 @@
 
 	return NULL;
 }
+#endif
 
 
 /*-----------------------------------------------------------------------*/


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/