I'm having a bit of trouble including headers from Windows Driver Kit to Visual Studio 2010. Can anyone help me, what I am doing wrong?
I get error message such as C1083: Cannot open include file: 'sal.h': No such file or directory.
If I include SDK directory, I get error messages such as type redefinitions.
If I copy sal.h to DDK directory, I get error message C1083: Cannot open include file: 'codeanalysis\sourceannotations.h': No such file or directory.
If I copy sourceannotations.h file to DDK directory I get other error messages (see below)
VC++ Directoy settings: include directory settings
#include "stdafx.h"
#include <Winsock2.h>
#include <windows.h>
#include <stdio.h>
#include <conio.h>
#include <strsafe.h>
#include <fwpmu.h>
#include <ndis.h>
Error 1 error C1083: Cannot open include file: 'codeanalysis\sourceannotations.h': No such file or directory c:\winddk\7600.16385.1\inc\crt\sal.h 160 1 wfp
2 IntelliSense: cannot open source file "codeanalysis\sourceannotations.h" c:\winddk\7600.16385.1\inc\crt\sal.h 160 1
21 IntelliSense: cannot overload functions distinguished by return type alone c:\winddk\7600.16385.1\inc\ddk\ntddk.h 2895 1
22 IntelliSense: cannot overload functions distinguished by return type alone c:\winddk\7600.16385.1\inc\ddk\ntddk.h 2907 1
23 IntelliSense: cannot overload functions distinguished by return type alone c:\winddk\7600.16385.1\inc\ddk\ntddk.h 2917 1
8 IntelliSense: expected a ')' c:\winddk\7600.16385.1\inc\api\fwptypes.h 345 49
6 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\api\fwptypes.h 281 4
9 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\api\fwptypes.h 364 1
11 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\api\iketypes.h 370 1
16 IntelliSense: expected a ';' c:\winddk\7600.16385.1\inc\ddk\wdm.h 8838 1
25 IntelliSense: expected a declaration c:\winddk\7600.16385.1\inc\ddk\ntddk.h 15056 5
4 IntelliSense: expected a type specifier c:\winddk\7600.16385.1\inc\api\fwptypes.h 275 18
3 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\api\fwptypes.h 275 5
7 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\api\fwptypes.h 345 5
10 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\api\iketypes.h 369 2
18 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\ddk\wdm.h 17964 1
19 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\ddk\wdm.h 17970 9
24 IntelliSense: expected an identifier c:\winddk\7600.16385.1\inc\ddk\ntddk.h 15037 3
14 IntelliSense: identifier "FWP_FILTER_ENUM_TYPE" is undefined c:\winddk\7600.16385.1\inc\api\fwpmtypes.h 413 5
12 IntelliSense: identifier "IKEEXT_IP_VERSION_SPECIFIC_KEYMODULE_STATISTICS0" is undefined c:\winddk\7600.16385.1\inc\api\iketypes.h 418 5
13 IntelliSense: identifier "IKEEXT_IP_VERSION_SPECIFIC_KEYMODULE_STATISTICS0" is undefined c:\winddk\7600.16385.1\inc\api\iketypes.h 419 5
20 IntelliSense: identifier "PCALLBACK_FUNCTION" is undefined c:\winddk\7600.16385.1\inc\ddk\wdm.h 17994 10
17 IntelliSense: identifier "TIME_FIELDS" is undefined c:\winddk\7600.16385.1\inc\ddk\wdm.h 9012 9
15 IntelliSense: this declaration has no storage class or type specifier c:\winddk\7600.16385.1\inc\ddk\wdm.h 8837 1
5 IntelliSense: unexpected parenthesis after declaration of function "<error>" (malformed parameter list or invalid initializer?) c:\winddk\7600.16385.1\inc\api\fwptypes.h 278 4
You cant' mix the headers from the SDK with the ones from the DDK.
So uncheck the box for inheriting parent settings. May then you have to add other directories from the DDK.
Also note that you also can't mix libraries from the DDK with the ones from the SDK. So you have to do there almost the same.
Related
Hello everyone.
I am trying to compile simple C code.
#include <stdio.h>
void main()
{
printf("Hello world\n");
}
But I get this error.
$ gcc main.c
/data/data/com.termux/files/usr/bin/ld: /data/data/com.termux/files/usr/bin/../lib/gcc/aarch64-unknown-linux-gnu/10.2.0/libgcc.a(lse-init.o): undefined reference to symbol '__getauxval##GLIBC_2.17'
/data/data/com.termux/files/usr/bin/ld: /data/data/com.termux/files/usr/lib/libc.so.6: error adding symbols: DSO missing from command line
collect2: error: ld returned 1 exit status
I understand that the error occurs due to the fact that the compidator cannot find the font, but this is not accurate. And the same error occurs in C++.
How do I fix this error?
In short, this error occurs due to the fact that libraries of type libc were not in the common directory.
These libraries:
-rwxr-xr-x 1 10504 10504 1827624 Aug 4 16:27 /lib/conlib/libc-2.32.so
-rw-r--r-- 1 10504 10504 4592750 Aug 4 16:27 /lib/conlib/libc.a
-rw-r--r-- 1 10504 10504 351 Aug 4 16:27 /lib/conlib/libc.so
lrwxrwxrwx 1 10504 10504 18 Aug 4 16:27 /lib/conlib/libc.so.6 -> libc-2.32.so
-rw-r--r-- 1 10504 10504 24964 Aug 4 16:27 /lib/conlib/libc_nonshared.a
Here is the thing: I can copy data from a SQL Server database to my local (.sdf) using SQL Server CE using this code:
Public Sub synctrackingstatus()
connection()
sqltable = New DataTable
adap = New SqlClient.SqlDataAdapter
adap = New SqlClient.SqlDataAdapter("SELECT * from TRACKINGSTATUS", con)
adap.Fill(sqltable)
LoginForm.ProgressBar1.Maximum = sqltable.Rows.Count
For Each trackingstatus As DataRow In sqltable.Rows
branches = trackingstatus.Item("ID")
LoginForm.Update()
sqlconnect()
sqlcom = New SqlServerCe.SqlCeCommand("SELECT * FROM TRACKINGSTATUS where ID = '" & trackingstatus.Item("ID") & "' ", sqlcon)
Dim read As SqlServerCe.SqlCeDataReader = sqlcom.ExecuteReader
If read.Read = True Then
sqlcon.Close()
LoginForm.ProgressBar1.Value += 1
percent = (LoginForm.ProgressBar1.Value / LoginForm.ProgressBar1.Maximum) * 100
LoginForm.loading.Text = percent.ToString("N2") & "%"
sqlconnect()
sqlcom = New SqlServerCe.SqlCeCommand("Update TRACKINGSTATUS set ID =#ID,TrackingStatus=#TrackingStatus where ID = '" & trackingstatus.Item("ID") & "'", sqlcon)
'Username, Password, BranchID, FIRSTNAME, LASTNAME, DESIGNATION, Memo, I
sqlcom.Parameters.AddWithValue("#ID", trackingstatus.Item("ID"))
sqlcom.Parameters.AddWithValue("#TrackingStatus", trackingstatus.Item("TrackingStatus"))
sqlcom.ExecuteNonQuery()
sqlcon.Close()
Else
client = trackingstatus.Item("ID").ToString.Replace(" ", "")
sqlcon.Close()
LoginForm.ProgressBar1.Value += 1
percent = (LoginForm.ProgressBar1.Value / LoginForm.ProgressBar1.Maximum) * 100
LoginForm.loading.Text = percent.ToString("N2") & "%"
sqlconnect()
sqlcom = New SqlServerCe.SqlCeCommand("INSERT INTO TRACKINGSTATUS (ID,TrackingStatus) values (#ID,#TrackingStatus)", sqlcon)
sqlcom.Parameters.AddWithValue("#ID", trackingstatus.Item("ID"))
sqlcom.Parameters.AddWithValue("#TrackingStatus", trackingstatus.Item("TrackingStatus"))
sqlcon.Close()
End If
Next
LoginForm.ProgressBar1.Maximum = 0
LoginForm.ProgressBar1.Value = 0
LoginForm.loading.Text = ""
End Sub
It gets the data 1 by 1 because of the for each statement.. and getting it 1 by 1 takes it a minute or even an hour coz I have thousands of data records in every table of my SQL Server.
I want it to copy all instantly..
Is there anyway to copy it fast enough to lessen my waiting time to get the data? :D
================================================================
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;
using ErikEJ.SqlCe;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
SqlCommand com = new SqlCommand();
SqlConnection con = new SqlConnection("Data Source=192.168.0.97;Initial Catalog=SALESANDTRACKING;User ID=sa;Password=jrs#morethan50");
// Getting source data
com = new SqlCommand("SELECT * FROM AIRBILLS where DateofAirbill between '2017-08-01' and '2017-10-25'", con);
con.Open();
SqlDataReader rdr = com.ExecuteReader();
// Initializing an SqlBulkCopy object
SqlBulkCopy sbc = new SqlBulkCopy("Data Source=localhost;Initial Catalog=AIRBILLS;Integrated Security=True");
// Copying data to destination
sbc.ColumnMappings.Add("ID", "ID");
sbc.ColumnMappings.Add("Sender", "AIRBILL");
sbc.DestinationTableName = "Airbills";
sbc.BulkCopyTimeout = 60;
sbc.WriteToServer(rdr);
// Closing connection and the others
sbc.Close();
rdr.Close();
con.Close();
MessageBox.Show("Database Copied");
}
private static void DoBulkCopy(bool keepNulls, IDataReader reader)
{
SqlCeBulkCopyOptions option = new SqlCeBulkCopyOptions();
if (keepNulls)
{
options = options |= SqlCeBulkCopyOptions.KeepNulls;
}
using (SqlCeBulkCopy bc = new SqlCeBulkCopy(#"Data Source=C:\Users\REGIME\Desktop\WindowsFormsApplication1\Database1.sdf", options))
{
bc.DestinationTableName = "Airbills";
bc.WriteToServer(reader);
}
}
}
}
I updated my code so far.. I can use EricEJ.SqlCe but after I put that namespace and change connectionstring but the following error occured
Error 38 Ambiguity between 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.ColumnName' and 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.ColumnName' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 102 68 WindowsFormsApplication1
Error 41 Ambiguity between 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.ColumnName' and 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.ColumnName' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 114 162 WindowsFormsApplication1
Error 61 Ambiguity between 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.ColumnName' and 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.ColumnName' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 227 33 WindowsFormsApplication1
Error 39 Ambiguity between 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.HasDefault' and 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.HasDefault' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 111 52 WindowsFormsApplication1
Error 40 Ambiguity between 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.IsNullable' and 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.IsNullable' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 111 95 WindowsFormsApplication1
Error 59 Ambiguity between 'ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter.FieldCount' and 'ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter.FieldCount' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 215 59 WindowsFormsApplication1
Error 27 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopy.DestinationTableName' and 'ErikEJ.SqlCe.SqlCeBulkCopy.DestinationTableName' C:\Users\REGIME\Desktop\WindowsFormsApplication1\Form1.cs 67 20 WindowsFormsApplication1
Error 46 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationColumn' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationColumn' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 135 51 WindowsFormsApplication1
Error 52 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationColumn' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationColumn' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 174 96 WindowsFormsApplication1
Error 53 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationColumn' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationColumn' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 178 69 WindowsFormsApplication1
Error 54 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 189 37 WindowsFormsApplication1
Error 55 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 189 71 WindowsFormsApplication1
Error 56 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 191 72 WindowsFormsApplication1
Error 57 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.DestinationOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 193 45 WindowsFormsApplication1
Error 45 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceColumn' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceColumn' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 134 53 WindowsFormsApplication1
Error 47 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceColumn' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceColumn' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 144 107 WindowsFormsApplication1
Error 48 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 150 37 WindowsFormsApplication1
Error 49 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 150 66 WindowsFormsApplication1
Error 50 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 151 99 WindowsFormsApplication1
Error 51 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SourceOrdinal' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 153 47 WindowsFormsApplication1
Error 25 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyOptions.KeepNulls' and 'ErikEJ.SqlCe.SqlCeBulkCopyOptions.KeepNulls' C:\Users\REGIME\Desktop\WindowsFormsApplication1\Form1.cs 63 59 WindowsFormsApplication1
Error 33 Ambiguity between 'ErikEJ.SqlCe.SqlCeBulkCopyOptions.KeepNulls' and 'ErikEJ.SqlCe.SqlCeBulkCopyOptions.KeepNulls' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 82 89 WindowsFormsApplication1
Error 36 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.GetDataForTable(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, string)' and 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.GetDataForTable(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, string)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 87 34 WindowsFormsApplication1
Error 43 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.GetDataForTable(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, string)' and 'ErikEJ.SqlCe.DestinationTableDefaultMetadata.GetDataForTable(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, string)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 130 49 WindowsFormsApplication1
Error 60 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter.FieldName(int)' and 'ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter.FieldName(int)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 217 35 WindowsFormsApplication1
Error 28 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopy.WriteToServer(System.Data.IDataReader)' and 'ErikEJ.SqlCe.SqlCeBulkCopy.WriteToServer(System.Data.IDataReader)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\Form1.cs 68 17 WindowsFormsApplication1
Error 30 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(int, int)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(int, int)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 35 22 WindowsFormsApplication1
Error 31 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(int, string)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(int, string)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 45 22 WindowsFormsApplication1
Error 32 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(string, int)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(string, int)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 55 22 WindowsFormsApplication1
Error 29 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(string, string)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMapping.SqlCeBulkCopyColumnMapping(string, string)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 25 22 WindowsFormsApplication1
Error 58 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.Create(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter, ErikEJ.SqlCe.SqlCeBulkCopyOptions, string)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.Create(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter, ErikEJ.SqlCe.SqlCeBulkCopyOptions, string)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 207 24 WindowsFormsApplication1
Error 37 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.GetSourceColumns(ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.GetSourceColumns(ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 97 33 WindowsFormsApplication1
Error 42 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.GetSourceColumns(ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.GetSourceColumns(ErikEJ.SqlCe.ISqlCeBulkCopyInsertAdapter)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 129 37 WindowsFormsApplication1
Error 44 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.ToColumnNames(System.Collections.Generic.List<ErikEJ.SqlCe.DestinationTableDefaultMetadata>)' and 'ErikEJ.SqlCe.SqlCeBulkCopyColumnMappingCollection.ToColumnNames(System.Collections.Generic.List<ErikEJ.SqlCe.DestinationTableDefaultMetadata>)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 130 35 WindowsFormsApplication1
Error 35 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyTableHelpers.IdentityOrdinal(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, string)' and 'ErikEJ.SqlCe.SqlCeBulkCopyTableHelpers.IdentityOrdinal(System.Data.SqlServerCe.SqlCeConnection, System.Data.SqlServerCe.SqlCeTransaction, string)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 85 29 WindowsFormsApplication1
Error 34 The call is ambiguous between the following methods or properties: 'ErikEJ.SqlCe.SqlCeBulkCopyTableHelpers.IsCopyOption(ErikEJ.SqlCe.SqlCeBulkCopyOptions, ErikEJ.SqlCe.SqlCeBulkCopyOptions)' and 'ErikEJ.SqlCe.SqlCeBulkCopyTableHelpers.IsCopyOption(ErikEJ.SqlCe.SqlCeBulkCopyOptions, ErikEJ.SqlCe.SqlCeBulkCopyOptions)' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 82 29 WindowsFormsApplication1
Error 23 The name 'options' does not exist in the current context C:\Users\REGIME\Desktop\WindowsFormsApplication1\Form1.cs 63 17 WindowsFormsApplication1
Error 24 The name 'options' does not exist in the current context C:\Users\REGIME\Desktop\WindowsFormsApplication1\Form1.cs 63 27 WindowsFormsApplication1
Error 26 The name 'options' does not exist in the current context C:\Users\REGIME\Desktop\WindowsFormsApplication1\Form1.cs 65 136 WindowsFormsApplication1
Error 3 The namespace 'ErikEJ.SqlCe' already contains a definition for 'AdoNetUtils' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\AdoNetUtils.cs 6 24 WindowsFormsApplication1
Error 4 The namespace 'ErikEJ.SqlCe' already contains a definition for 'AdoNetUtils' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\AdoNetUtils(2).cs 6 24 WindowsFormsApplication1
Error 11 The namespace 'ErikEJ.SqlCe' already contains a definition for 'DestinationTableDefaultMetadata' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\DestinationTableDefaultMetadata(2).cs 9 24 WindowsFormsApplication1
Error 12 The namespace 'ErikEJ.SqlCe' already contains a definition for 'DestinationTableDefaultMetadata' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\DestinationTableDefaultMetadata.cs 9 24 WindowsFormsApplication1
Error 5 The namespace 'ErikEJ.SqlCe' already contains a definition for 'ISqlCeBulkCopyInsertAdapter' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\ISqlCeBulkCopyInsertAdapter.cs 6 24 WindowsFormsApplication1
Error 6 The namespace 'ErikEJ.SqlCe' already contains a definition for 'ISqlCeBulkCopyInsertAdapter' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\ISqlCeBulkCopyInsertAdapter.cs 6 24 WindowsFormsApplication1
Error 21 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopy' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopy.cs 19 18 WindowsFormsApplication1
Error 22 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopy' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopy.cs 19 18 WindowsFormsApplication1
Error 13 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyColumnMapping' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyColumnMapping.cs 9 25 WindowsFormsApplication1
Error 14 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyColumnMapping' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopyColumnMapping.cs 9 25 WindowsFormsApplication1
Error 19 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyColumnMappingCollection' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyMappingCollection.cs 12 25 WindowsFormsApplication1
Error 20 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyColumnMappingCollection' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopyMappingCollection(2).cs 12 25 WindowsFormsApplication1
Error 7 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyDataReaderAdapter' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyDataReaderAdapter.cs 6 27 WindowsFormsApplication1
Error 8 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyDataReaderAdapter' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopyDataReaderAdapter(2).cs 6 27 WindowsFormsApplication1
Error 1 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyDataTableAdapter' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopyDataTableAdapter(2).cs 6 20 WindowsFormsApplication1
Error 2 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyDataTableAdapter' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyDataTableAdapter.cs 6 20 WindowsFormsApplication1
Error 17 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyOptions' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopyOptions.cs 10 17 WindowsFormsApplication1
Error 18 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyOptions' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopyOptions(2).cs 10 17 WindowsFormsApplication1
Error 15 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyTableHelpers' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\SqlCeBulkCopyTableHelpers.cs 9 27 WindowsFormsApplication1
Error 16 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeBulkCopyTableHelpers' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeBulkCopyTableHelpers.cs 9 27 WindowsFormsApplication1
Error 9 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeRowsCopiedEventArgs' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeRowsCopiedEventArgs(2).cs 9 18 WindowsFormsApplication1
Error 10 The namespace 'ErikEJ.SqlCe' already contains a definition for 'SqlCeRowsCopiedEventArgs' C:\Users\REGIME\Desktop\WindowsFormsApplication1\EricJS\SqlCeBulkCopy-master\src\Backup\SqlCeRowsCopiedEventArgs.cs 9 18 WindowsFormsApplication1
I didn't change anything in your library though..
=========================================================
#ErikEJ Hi sorry if I ask so many question to you, I deleted the code and install the nugget package then another oroblem is occured
Severity Code Description Project File Line
Error Custom tool error: Failed to generate code. Exception of type 'System.Data.Design.InternalException' was thrown. WindowsFormsApplication1 C:\Users\REGIME\Desktop\WindowsFormsApplication1\Database1DataSet.xsd 1
Error CS1705 Assembly 'ErikEJ.SqlCe40' with identity 'ErikEJ.SqlCe40, Version=2.1.6.14, Culture=neutral, PublicKeyToken=03b0b5a60fec3719' uses 'System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' which has a higher version than referenced assembly 'System.Data.SqlServerCe' with identity 'System.Data.SqlServerCe, Version=3.5.1.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' WindowsFormsApplication1 C:\Users\REGIME\Desktop\WindowsFormsApplication1\Form1.cs 35
I use .NET Framework 4 Client Profile
===============================================================
The database file has been created by an earlier version of SQL Server Compact. Please upgrade using SqlCeEngine.Upgrade() method.
Do not use DataTable, it incurs a lot of unneded overhead, but get the data from SQL Server via a SqlDataReader.
Then you can use my SqlCeBulkCopy library to do very fast INSERTs into the SQL Compact database. (May require you to work with empty tables, though)
using ErikEJ.SqlCe;
private static void DoBulkCopy(bool keepNulls, IDataReader reader)
{
SqlCeBulkCopyOptions options = new SqlCeBulkCopyOptions();
if (keepNulls)
{
options = options |= SqlCeBulkCopyOptions.KeepNulls;
}
using (SqlCeBulkCopy bc = new SqlCeBulkCopy(connectionString, options))
{
bc.DestinationTableName = "tblDoctor";
bc.WriteToServer(reader);
}
}
More info and sample apps here: https://github.com/ErikEJ/sqlcebulkcopy
i have these lines in preprocesor output.
......
1 "test.c"
1 "/usr/include/stdio.h" 1 3 4
27 "/usr/include/stdio.h" 3
4 1 "/usr/include/features.h" 1 3 4
374 "/usr/include/features.h" 1 3 4
......
i got to know that at line 27 in stdio.h there is a call to include features.h but what does the other numbers 1,3,4 in both these line defines.
can anyone explain what exactly these different field means little elaborately.
as you see
1 "/usr/include/stdio.h" 1 3 4
27 "/usr/include/stdio.h" 3 4
why two inclusion of stdio.h or if i am wrong what does that means?
From gcc documentation:
Source file name and line number information is conveyed by lines of
the form
# linenum filename flags
These are called linemarkers. They are inserted as needed into the output (but never within a string or
character constant). They mean that the following line originated in
file filename at line linenum. filename will never contain any
non-printing characters; they are replaced with octal escape
sequences.
After the file name comes zero or more flags, which are ‘1’, ‘2’, ‘3’,
or ‘4’. If there are multiple flags, spaces separate them. Here is
what the flags mean:
‘1’ This indicates the start of a new file.
‘2’ This indicates returning to a file (after having included another file).
‘3’ This indicates that the following text comes from a system header file, so
certain warnings should be suppressed.
‘4’ This indicates that the following text should be treated as being wrapped in an implicit extern "C" block.
I have something weird...
I am trying to do a proxy DLL for an old game (based on LithTech engine, abandonware, Windows 98 application), so I used wrappit, made the DLL, made it compiling, but... Well...
The DLL itself seems to be OK. At least the DllMain gets executed when testing with LOADDLL from OllyDbg...
But when I insert it into the game folder instead of the original DLL, it loads the DLL, and then it doesn't execute the DLL entry point DllMain! In some builds (Visual Studio 2005) it just says nothing. In other builds (Visual Studio 2010) it raises the c0000139 exception (which is "Entry point not found"). But how can it be that entry point is not found when it loads fine with LOADDLL in ollydbg, which means that the entry oint is in place?
Please help me!
UPD:
Posting the dumpbin /exports output:
The original DLL:
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file IMUSIC25_.DLL
File Type: DLL
Section contains the following exports for IMUSIC25.DLL
00000000 characteristics
33713027 time date stamp Thu May 08 05:45:11 1997
0.00 version
1 ordinal base
29 number of functions
29 number of names
ordinal hint RVA name
6 0 0000FD8B DllCanUnloadNow
7 1 0000FDF9 DllGetClassObject
8 2 0000FD85 DllRegisterServer
9 3 0000FD88 DllUnregisterServer
1 4 000105BD _AllocAAEngine2#8
2 5 00010507 _AllocAAEngine#4
3 6 00007101 _AllocAALoader#4
4 7 000074FC _AllocAALoaderLite#4
5 8 00010675 _AllocAAMIDIIn#4
10 9 000106A1 _GetFinalMIDISink#4
11 A 0001127F _LoadBandFile#12
12 B 000115F9 _LoadMotifFile#12
13 C 00011601 _LoadPatternFile#12
14 D 0001123C _LoadPersonalityByName#12
15 E 000111F9 _LoadPersonalityFile#12
16 F 000118F7 _LoadPersonalityFromMemory#12
17 10 0001131E _LoadSectionFile#12
18 11 000114BB _LoadSongFile#12
19 12 000111B6 _LoadStyleByName#12
20 13 00011173 _LoadStyleFile#12
21 14 0001182C _LoadStyleFromMemory#12
22 15 0001155A _LoadTemplateFile#12
23 16 000102B1 _MusicEngineSimpleInit95#12
24 17 00010497 _MusicEngineSimpleInit#12
25 18 00010066 _MusicEngineSimpleInitNT#12
26 19 000119C2 _Panic#4
27 1A 00011465 _SaveSectionAsMIDIFile#8
28 1B 000113E1 _SaveSectionFile#8
29 1C 00010692 _SetAADebug#4
Summary
4000 .data
1000 .idata
1000 .rdata
2000 .reloc
1000 .rsrc
1B000 .text
My crafted DLL:
Microsoft (R) COFF/PE Dumper Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.
Dump of file IMUSIC25.DLL
File Type: DLL
Section contains the following exports for imusic25.dll
00000000 characteristics
52F816DB time date stamp Mon Feb 10 04:01:31 2014
0.00 version
1 ordinal base
30 number of functions
30 number of names
ordinal hint RVA name
6 0 00001020 DllCanUnloadNow = ___E__0__#0
7 1 00001030 DllGetClassObject = ___E__1__#0
8 2 00001040 DllRegisterServer = ___E__2__#0
9 3 00001050 DllUnregisterServer = ___E__3__#0
2 4 00001060 _AllocAAEngine = ___E__5__#0
1 5 00001130 _AllocAAEngine2 = ___E__4__#0
3 6 00001070 _AllocAALoader = ___E__6__#0
4 7 00001080 _AllocAALoaderLite = ___E__7__#0
5 8 00001090 _AllocAAMIDIIn = ___E__8__#0
30 9 00001000 _DllMain#12 = _DllMain#12
10 A 000010A0 _GetFinalMIDISink = ___E__9__#0
11 B 000010B0 _LoadBandFile = ___E__10__#0
12 C 000010C0 _LoadMotifFile = ___E__11__#0
13 D 000010D0 _LoadPatternFile = ___E__12__#0
14 E 000010E0 _LoadPersonalityByName = ___E__13__#0
15 F 000010F0 _LoadPersonalityFile = ___E__14__#0
16 10 00001100 _LoadPersonalityFromMemory = ___E__15__#0
17 11 00001130 _LoadSectionFile = ___E__4__#0
18 12 00001110 _LoadSongFile = ___E__17__#0
19 13 00001120 _LoadStyleByName = ___E__18__#0
20 14 00001130 _LoadStyleFile = ___E__4__#0
21 15 00001150 _LoadStyleFromMemory = ___E__20__#0
22 16 00001160 _LoadTemplateFile = ___E__21__#0
24 17 00001180 _MusicEngineSimpleInit = ___E__23__#0
23 18 00001170 _MusicEngineSimpleInit95 = ___E__22__#0
25 19 00001190 _MusicEngineSimpleInitNT = ___E__24__#0
26 1A 000011A0 _Panic = ___E__25__#0
27 1B 000011B0 _SaveSectionAsMIDIFile = ___E__26__#0
28 1C 000011C0 _SaveSectionFile = ___E__27__#0
29 1D 000011D0 _SetAADebug = ___E__28__#0
Summary
1000 .data
1000 .rdata
1000 .rsrc
1000 .text
UPD: I checked the "GetLastError" on the failing LoadLibraryA call - it is 0x1E7 (487) - ERROR_INVALID_ADDRESS
Well, I managed to fix that by changing the definition of the functions and making them like in the original one.
For that, you need to set the function type to WINAPI (actually it is __stdcall but it seems that the compiler/linker somehow differentiates them? Because the mangling behaviour was different between __stdcall and WINAPI) and define the function parameters - you can calculate the number of needed ones from the last part of the mangled name (which is actually not present in the resulting DLL with the DEF file): #4 means one 4 bytes sized parameter (example - int), #8 means two, etc. You don't even need to know which is exactly the parameter type if you are working with wrappit generated functions - you just need to adjust the size to make mangling correct.
Next, you need to define the relation between the mangled names and ordinals in the DEF file.
There is probably a better and easier approach of using #pragma comment(linker, "/EXPORT:Function=Function#4,#1"), as per C++ DLL Export: Decorated/Mangled names (#wqw's answer) but I haven't tried it.
Also I needed to set up the relocations in project settings - that was probably the cause of "ERROR_INVALID_ADDRESS".
Case closed.
I have been stuck on this for a long time and for some reason my C code is not compiling. It produces a lot of cmath errors
Since It would have taken a lot of space to put my code and error together:
#include <stdlib.h>
#include <stdio.h>
#include <Windows.h>
#include <fstream>
typedef unsigned char* pointer;
void printDbPointers(void);
void show_int(int);
void show_bytes(unsigned char*, int);
void floatingPointRep();
void fahrenheit();
int main()
{
int a = 100;
show_int(a);
floatingPointRep();
fahrenheit();
printDbPointers();
Sleep(100000);
return 0;
}
void printDbPointers(){
char hi[7] = {'t', 'i', 'g', 'e', 'r', '\0'};
char *p, **dp;
p = &(hi[0]);
dp = &p;
printf("%c %c\n", *p, **dp);
printf("%p %p %p\n", p, *dp, hi);
p+=1;
printf("%c, %c\n", *p, **dp);
printf("%p %p %p\n", p, *dp, hi);
*dp+=2;
printf("%c, %c\n", *p, **dp);
printf("%p %p %p\n", p, *dp, hi);
}
void show_int(int x)
{
show_bytes((pointer) &x, sizeof(int));
}
void show_bytes(pointer start, int len)
{
int i;
for(i=0;i<len;i++)
{
// printf("0x%p\t0x%.2x\n", start + i, start[i]);
printf("0x%p\t\n", start + i, start[i]);
printf("\n");
}
}
void floatingPointRep()
{
float f1 = 1.0;
float f2 = 0.0;
int i;
for ( i=0; i<10; i++ ) {
f2 += 1.0/10.0;
}
printf("0x%08x 0x%08x\n", *(int*)&f1, *(int*)&f2);
printf("f1 = %10.8f\n", f1);
printf("f2 = %10.8f\n\n", f2);
f1 = 1E30;
f2 = 1E-30;
}
void fahrenheit()
{
int i;
double arr[3] = {12345678.000, 98765345.333, 456793332.300};
for (i = 0; i < 3; i++)
printf ("%g\n", arr[i]);
}
However, if it violates the rule of SO to put question code somewhere else, let me know and I will put it here
73 error C1003: error count exceeds 100; stopping compilation
4 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 28 1
7 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 29 1
11 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 30 1
15 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 31 1
19 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 32 1
23 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 33 1
27 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 34 1
31 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 35 1
34 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 37 1
37 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 38 1
41 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 39 1
45 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 40 1
49 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 41 1
53 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 42 1
57 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 43 1
61 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 44 1
64 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 46 1
66 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 48 1
69 error C2059: syntax error : ';' c:\program files\microsoft visual studio 11.0\vc\include\cmath 49 1
63 error C2061: syntax error : identifier 'abs' c:\program files\microsoft visual studio 11.0\vc\include\cmath 46 1
65 error C2061: syntax error : identifier 'acos' c:\program files\microsoft visual studio 11.0\vc\include\cmath 48 1
3 error C2061: syntax error : identifier 'acosf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 28 1
33 error C2061: syntax error : identifier 'acosl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 37 1
67 error C2061: syntax error : identifier 'asin' c:\program files\microsoft visual studio 11.0\vc\include\cmath 48 1
5 error C2061: syntax error : identifier 'asinf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 28 1
35 error C2061: syntax error : identifier 'asinl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 37 1
68 error C2061: syntax error : identifier 'atan' c:\program files\microsoft visual studio 11.0\vc\include\cmath 49 1
70 error C2061: syntax error : identifier 'atan2' c:\program files\microsoft visual studio 11.0\vc\include\cmath 49 1
8 error C2061: syntax error : identifier 'atan2f' c:\program files\microsoft visual studio 11.0\vc\include\cmath 29 1
38 error C2061: syntax error : identifier 'atan2l' c:\program files\microsoft visual studio 11.0\vc\include\cmath 38 1
6 error C2061: syntax error : identifier 'atanf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 29 1
36 error C2061: syntax error : identifier 'atanl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 38 1
71 error C2061: syntax error : identifier 'ceil' c:\program files\microsoft visual studio 11.0\vc\include\cmath 49 1
9 error C2061: syntax error : identifier 'ceilf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 29 1
39 error C2061: syntax error : identifier 'ceill' c:\program files\microsoft visual studio 11.0\vc\include\cmath 38 1
72 error C2061: syntax error : identifier 'cos' c:\program files\microsoft visual studio 11.0\vc\include\cmath 50 1
10 error C2061: syntax error : identifier 'cosf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 30 1
12 error C2061: syntax error : identifier 'coshf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 30 1
42 error C2061: syntax error : identifier 'coshl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 39 1
40 error C2061: syntax error : identifier 'cosl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 39 1
13 error C2061: syntax error : identifier 'expf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 30 1
43 error C2061: syntax error : identifier 'expl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 39 1
14 error C2061: syntax error : identifier 'fabsf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 31 1
44 error C2061: syntax error : identifier 'fabsl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 40 1
16 error C2061: syntax error : identifier 'floorf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 31 1
46 error C2061: syntax error : identifier 'floorl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 40 1
17 error C2061: syntax error : identifier 'fmodf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 31 1
47 error C2061: syntax error : identifier 'fmodl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 40 1
18 error C2061: syntax error : identifier 'frexpf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 32 1
48 error C2061: syntax error : identifier 'frexpl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 41 1
20 error C2061: syntax error : identifier 'ldexpf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 32 1
50 error C2061: syntax error : identifier 'ldexpl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 41 1
22 error C2061: syntax error : identifier 'log10f' c:\program files\microsoft visual studio 11.0\vc\include\cmath 33 1
52 error C2061: syntax error : identifier 'log10l' c:\program files\microsoft visual studio 11.0\vc\include\cmath 42 1
21 error C2061: syntax error : identifier 'logf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 32 1
51 error C2061: syntax error : identifier 'logl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 41 1
24 error C2061: syntax error : identifier 'modff' c:\program files\microsoft visual studio 11.0\vc\include\cmath 33 1
54 error C2061: syntax error : identifier 'modfl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 42 1
25 error C2061: syntax error : identifier 'powf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 33 1
55 error C2061: syntax error : identifier 'powl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 42 1
26 error C2061: syntax error : identifier 'sinf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 34 1
28 error C2061: syntax error : identifier 'sinhf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 34 1
58 error C2061: syntax error : identifier 'sinhl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 43 1
56 error C2061: syntax error : identifier 'sinl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 43 1
29 error C2061: syntax error : identifier 'sqrtf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 34 1
59 error C2061: syntax error : identifier 'sqrtl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 43 1
30 error C2061: syntax error : identifier 'tanf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 35 1
32 error C2061: syntax error : identifier 'tanhf' c:\program files\microsoft visual studio 11.0\vc\include\cmath 35 1
62 error C2061: syntax error : identifier 'tanhl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 44 1
60 error C2061: syntax error : identifier 'tanl' c:\program files\microsoft visual studio 11.0\vc\include\cmath 44 1
There seems to be some confusion. You have #included fstream, and that's part of C++, not C.
It seems that fstream for some reason does its own #include of cmath, and the errors probably come from incompatibilities between C and C++.
EDIT:
Yes, after several levels of #includes, cmath is #included, and cmath is not just a copy of math.h, but contains C++-specific code.